[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 19/39: fec: LDPC: renaming some of the LDPC
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 19/39: fec: LDPC: renaming some of the LDPC classes for clarity/consistency. |
Date: |
Thu, 15 Oct 2015 21:21:29 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit ab02d325afcd2bd1acf89442bc93262fadeaef96
Author: tracierenea <address@hidden>
Date: Sun Feb 22 13:24:29 2015 -0600
fec: LDPC: renaming some of the LDPC classes for clarity/consistency.
- renamed class from generator_mtrx to ldpc_gen_mtrx
- renamed class from generator_encoder to ldpc_gen_mtrx_encoder
- renamed class from generator_encoder_impl to ldpc_gen_mtrx_encoder_impl
---
gr-fec/include/gnuradio/fec/CMakeLists.txt | 4 ++--
.../fec/{generator_mtrx.h => ldpc_gen_mtrx.cc} | 14 ++++++-------
...generator_encoder.h => ldpc_gen_mtrx_encoder.h} | 12 +++++------
gr-fec/lib/CMakeLists.txt | 4 ++--
gr-fec/lib/{generator_mtrx.cc => ldpc_gen_mtrx.cc} | 14 ++++++-------
...coder_impl.cc => ldpc_gen_mtrx_encoder_impl.cc} | 24 +++++++++++-----------
...encoder_impl.h => ldpc_gen_mtrx_encoder_impl.h} | 18 ++++++++--------
gr-fec/swig/fec_swig.i | 6 ++++--
8 files changed, 49 insertions(+), 47 deletions(-)
diff --git a/gr-fec/include/gnuradio/fec/CMakeLists.txt
b/gr-fec/include/gnuradio/fec/CMakeLists.txt
index 8f5554d..1f5dea9 100644
--- a/gr-fec/include/gnuradio/fec/CMakeLists.txt
+++ b/gr-fec/include/gnuradio/fec/CMakeLists.txt
@@ -56,8 +56,8 @@ install(FILES
ldpc_R_U_mtrx.h
ldpc_bit_flip_decoder.h
ldpc_R_U_encoder.h
- generator_mtrx.h
- generator_encoder.h
+ ldpc_gen_mtrx.h
+ ldpc_gen_mtrx_encoder.h
fec_mtrx.h
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec
COMPONENT "fec_devel"
diff --git a/gr-fec/include/gnuradio/fec/generator_mtrx.h
b/gr-fec/include/gnuradio/fec/ldpc_gen_mtrx.cc
similarity index 83%
rename from gr-fec/include/gnuradio/fec/generator_mtrx.h
rename to gr-fec/include/gnuradio/fec/ldpc_gen_mtrx.cc
index 4ee37b6..d8c3435 100644
--- a/gr-fec/include/gnuradio/fec/generator_mtrx.h
+++ b/gr-fec/include/gnuradio/fec/ldpc_gen_mtrx.cc
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef INCLUDED_generator_mtrx_H
-#define INCLUDED_generator_mtrx_H
+#ifndef INCLUDED_ldpc_gen_mtrx_H
+#define INCLUDED_ldpc_gen_mtrx_H
#include <gsl/gsl_randist.h>
#include <gsl/gsl_permutation.h>
@@ -31,24 +31,24 @@
namespace gr {
namespace fec {
namespace code {
- class FEC_API generator_mtrx : public fec_mtrx
+ class FEC_API ldpc_gen_mtrx : public fec_mtrx
{
private:
// GSL matrix structure for the generator matrix (encode)
gsl_matrix *d_G_ptr;
public:
- generator_mtrx(const std::string filename);
+ ldpc_gen_mtrx(const std::string filename);
// Default constructor, should not be used
- generator_mtrx();
+ ldpc_gen_mtrx();
// Get the generator matrix (used during encoding)
const gsl_matrix *G();
// Destructor
- virtual ~generator_mtrx();
+ virtual ~ldpc_gen_mtrx();
};
}
}
}
-#endif /* INCLUDED_generator_mtrx_H */
\ No newline at end of file
+#endif /* INCLUDED_ldpc_gen_mtrx_H */
\ No newline at end of file
diff --git a/gr-fec/include/gnuradio/fec/generator_encoder.h
b/gr-fec/include/gnuradio/fec/ldpc_gen_mtrx_encoder.h
similarity index 87%
rename from gr-fec/include/gnuradio/fec/generator_encoder.h
rename to gr-fec/include/gnuradio/fec/ldpc_gen_mtrx_encoder.h
index 2cd1f3a..b3921c8 100644
--- a/gr-fec/include/gnuradio/fec/generator_encoder.h
+++ b/gr-fec/include/gnuradio/fec/ldpc_gen_mtrx_encoder.h
@@ -18,12 +18,12 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef INCLUDED_FEC_GENERATOR_ENCODER_H
-#define INCLUDED_FEC_GENERATOR_ENCODER_H
+#ifndef INCLUDED_FEC_LDPC_GEN_MTRX_ENCODER_H
+#define INCLUDED_FEC_LDPC_GEN_MTRX_ENCODER_H
#include <gnuradio/fec/api.h>
#include <gnuradio/fec/generic_encoder.h>
-#include <gnuradio/fec/generator_mtrx.h>
+#include <gnuradio/fec/ldpc_gen_mtrx.h>
namespace gr {
namespace fec {
@@ -41,7 +41,7 @@ namespace gr {
G = [I P], where I is an identity matrix and P is the
parity submatrix.
*/
- class FEC_API generator_encoder : virtual public generic_encoder
+ class FEC_API ldpc_gen_mtrx_encoder : virtual public generic_encoder
{
public:
/*!
@@ -50,7 +50,7 @@ namespace gr {
* \param G_obj The generator matrix object to use
* for encoding.
*/
- static generic_encoder::sptr make(generator_mtrx *G_obj);
+ static generic_encoder::sptr make(ldpc_gen_mtrx *G_obj);
/*!
* Sets the uncoded frame size to \p frame_size. If \p
@@ -70,4 +70,4 @@ namespace gr {
} /* namespace fec */
} /* namespace gr */
-#endif /* INCLUDED_FEC_GENERATOR_ENCODER_H */
\ No newline at end of file
+#endif /* INCLUDED_FEC_LDPC_GEN_MTRX_ENCODER_H */
\ No newline at end of file
diff --git a/gr-fec/lib/CMakeLists.txt b/gr-fec/lib/CMakeLists.txt
index 9a067d0..5684212 100644
--- a/gr-fec/lib/CMakeLists.txt
+++ b/gr-fec/lib/CMakeLists.txt
@@ -93,8 +93,8 @@ list(APPEND gnuradio_fec_sources
ldpc_R_U_mtrx.cc
ldpc_bit_flip_decoder_impl.cc
ldpc_R_U_encoder_impl.cc
- generator_mtrx.cc
- generator_encoder_impl.cc
+ ldpc_gen_mtrx.cc
+ ldpc_gen_mtrx_encoder_impl.cc
fec_mtrx.cc
)
diff --git a/gr-fec/lib/generator_mtrx.cc b/gr-fec/lib/ldpc_gen_mtrx.cc
similarity index 90%
rename from gr-fec/lib/generator_mtrx.cc
rename to gr-fec/lib/ldpc_gen_mtrx.cc
index 28fd368..cb166e3 100644
--- a/gr-fec/lib/generator_mtrx.cc
+++ b/gr-fec/lib/ldpc_gen_mtrx.cc
@@ -21,7 +21,7 @@
#include "config.h"
#endif
-#include <gnuradio/fec/generator_mtrx.h>
+#include <gnuradio/fec/ldpc_gen_mtrx.h>
#include <math.h>
#include <fstream>
#include <vector>
@@ -32,7 +32,7 @@ namespace gr {
namespace fec {
namespace code {
- generator_mtrx::generator_mtrx(const std::string filename)
+ ldpc_gen_mtrx::ldpc_gen_mtrx(const std::string filename)
{
// Read the matrix from a file in alist format
d_G_ptr = read_matrix_from_file(filename);
@@ -56,7 +56,7 @@ namespace gr {
int test_if_equal = gsl_matrix_equal(identity,I_test);
if (!test_if_equal) {
- throw "Error in generator_mtrx constructor. It appears that the
given alist file did not contain a valid generator matrix of the form G = [I
P].\n";
+ throw "Error in ldpc_gen_mtrx constructor. It appears that the given
alist file did not contain a valid generator matrix of the form G = [I P].\n";
}
// Length of codeword = # of columns of generator matrix
@@ -103,22 +103,22 @@ namespace gr {
} // Constructor
// Default constructor, should not be used
- generator_mtrx::generator_mtrx()
+ ldpc_gen_mtrx::ldpc_gen_mtrx()
{
- std::cout << "Error in generator_mtrx(): Default "
+ std::cout << "Error in ldpc_gen_mtrx(): Default "
<< "constructor called.\nMust provide filename for"
<< " generator matrix. \n\n";
exit(1);
} // Default constructor
const gsl_matrix*
- generator_mtrx::G()
+ ldpc_gen_mtrx::G()
{
const gsl_matrix *G_ptr = d_G_ptr;
return G_ptr;
}
- generator_mtrx::~generator_mtrx()
+ ldpc_gen_mtrx::~ldpc_gen_mtrx()
{
// Call the gsl_matrix_free function to free memory.
gsl_matrix_free(d_H_ptr);
diff --git a/gr-fec/lib/generator_encoder_impl.cc
b/gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc
similarity index 72%
rename from gr-fec/lib/generator_encoder_impl.cc
rename to gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc
index b507c9c..3ef9d1f 100644
--- a/gr-fec/lib/generator_encoder_impl.cc
+++ b/gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc
@@ -22,21 +22,21 @@
#include "config.h"
#endif
-#include <generator_encoder_impl.h>
+#include <ldpc_gen_mtrx_encoder_impl.h>
#include <sstream>
namespace gr {
namespace fec {
namespace code {
generic_encoder::sptr
- generator_encoder::make(generator_mtrx *G_obj)
+ ldpc_gen_mtrx_encoder::make(ldpc_gen_mtrx *G_obj)
{
return generic_encoder::sptr
- (new generator_encoder_impl(G_obj));
+ (new ldpc_gen_mtrx_encoder_impl(G_obj));
}
- generator_encoder_impl::generator_encoder_impl(generator_mtrx *G_obj)
- : generic_encoder("generator_encoder")
+ ldpc_gen_mtrx_encoder_impl::ldpc_gen_mtrx_encoder_impl(ldpc_gen_mtrx
*G_obj)
+ : generic_encoder("ldpc_gen_mtrx_encoder")
{
// Generator matrix to use for encoding
d_G = G_obj;
@@ -45,24 +45,24 @@ namespace gr {
set_frame_size(d_G->k());
}
- generator_encoder_impl::~generator_encoder_impl()
+ ldpc_gen_mtrx_encoder_impl::~ldpc_gen_mtrx_encoder_impl()
{
}
int
- generator_encoder_impl::get_output_size()
+ ldpc_gen_mtrx_encoder_impl::get_output_size()
{
return d_G->n();
}
int
- generator_encoder_impl::get_input_size()
+ ldpc_gen_mtrx_encoder_impl::get_input_size()
{
return d_frame_size;
}
bool
- generator_encoder_impl::set_frame_size(unsigned int frame_size)
+ ldpc_gen_mtrx_encoder_impl::set_frame_size(unsigned int frame_size)
{
bool ret = true;
// TODO add some bounds check here? The frame size is
@@ -74,14 +74,14 @@ namespace gr {
}
double
- generator_encoder_impl::rate()
+ ldpc_gen_mtrx_encoder_impl::rate()
{
return (d_G->n())/static_cast<double>(d_frame_size);
}
void
- generator_encoder_impl::generic_work(void *inbuffer,
- void *outbuffer)
+ ldpc_gen_mtrx_encoder_impl::generic_work(void *inbuffer,
+ void *outbuffer)
{
diff --git a/gr-fec/lib/generator_encoder_impl.h
b/gr-fec/lib/ldpc_gen_mtrx_encoder_impl.h
similarity index 75%
rename from gr-fec/lib/generator_encoder_impl.h
rename to gr-fec/lib/ldpc_gen_mtrx_encoder_impl.h
index 2d88539..08d738c 100644
--- a/gr-fec/lib/generator_encoder_impl.h
+++ b/gr-fec/lib/ldpc_gen_mtrx_encoder_impl.h
@@ -18,18 +18,18 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef INCLUDED_FEC_GENERATOR_ENCODER_IMPL_H
-#define INCLUDED_FEC_GENERATOR_ENCODER_IMPL_H
+#ifndef INCLUDED_FEC_LDPC_GEN_MTRX_ENCODER_IMPL_H
+#define INCLUDED_FEC_LDPC_GEN_MTRX_ENCODER_IMPL_H
#include <map>
#include <string>
-#include <gnuradio/fec/generator_encoder.h>
-#include <gnuradio/fec/generator_mtrx.h>
+#include <gnuradio/fec/ldpc_gen_mtrx_encoder.h>
+#include <gnuradio/fec/ldpc_gen_mtrx.h>
namespace gr {
namespace fec {
namespace code {
- class FEC_API generator_encoder_impl : public generator_encoder
+ class FEC_API ldpc_gen_mtrx_encoder_impl : public ldpc_gen_mtrx_encoder
{
private:
void generic_work(void *inbuffer, void *outbuffer);
@@ -39,11 +39,11 @@ namespace gr {
// Number of bits in the information word
unsigned int d_frame_size;
// Generator matrix object to use for encoding
- generator_mtrx *d_G;
+ ldpc_gen_mtrx *d_G;
public:
- generator_encoder_impl(generator_mtrx *G_obj);
- ~generator_encoder_impl();
+ ldpc_gen_mtrx_encoder_impl(ldpc_gen_mtrx *G_obj);
+ ~ldpc_gen_mtrx_encoder_impl();
bool set_frame_size(unsigned int frame_size);
double rate();
@@ -52,4 +52,4 @@ namespace gr {
} /* namespace fec */
} /* namespace gr */
-#endif /* INCLUDED_FEC_GENERATOR_ENCODER_IMPL_H */
\ No newline at end of file
+#endif /* INCLUDED_FEC_LDPC_GEN_MTRX_ENCODER_IMPL_H */
\ No newline at end of file
diff --git a/gr-fec/swig/fec_swig.i b/gr-fec/swig/fec_swig.i
index 8b5ce5f..b1103ab 100644
--- a/gr-fec/swig/fec_swig.i
+++ b/gr-fec/swig/fec_swig.i
@@ -70,9 +70,10 @@
#include "gnuradio/fec/ldpc_par_chk_mtrx.h"
#include "gnuradio/fec/ldpc_R_U_mtrx.h"
#include "gnuradio/fec/fec_mtrx.h"
-#include "gnuradio/fec/generator_mtrx.h"
+#include "gnuradio/fec/ldpc_gen_mtrx.h"
#include "gnuradio/fec/ldpc_bit_flip_decoder.h"
#include "gnuradio/fec/ldpc_R_U_encoder.h"
+#include "gnuradio/fec/ldpc_gen_mtrx_encoder.h"
%}
%include "gnuradio/fec/generic_decoder.h"
@@ -103,10 +104,11 @@
%include "gnuradio/fec/tpc_decoder.h"
%include "gnuradio/fec/ldpc_par_chk_mtrx.h"
%include "gnuradio/fec/ldpc_R_U_mtrx.h"
-%include "gnuradio/fec/generator_mtrx.h"
+%include "gnuradio/fec/ldpc_gen_mtrx.h"
%include "gnuradio/fec/fec_mtrx.h"
%include "gnuradio/fec/ldpc_bit_flip_decoder.h"
%include "gnuradio/fec/ldpc_R_U_encoder.h"
+%include "gnuradio/fec/ldpc_gen_mtrx_encoder.h"
GR_SWIG_BLOCK_MAGIC2(fec, decoder);
GR_SWIG_BLOCK_MAGIC2(fec, encoder);
- [Commit-gnuradio] [gnuradio] branch master updated (77083c5 -> 616fee5), git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 03/39: fec: LDPC: Renaming some files., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 12/39: fec: LDPC: Improving memory management (GSL matrices)., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 11/39: fec: LDPC: Fixing simple, but crucial, error in decoder. doh!, git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 06/39: fec: LDPC: Adding bit flip decoder variable work function., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 15/39: fec: LDPC: Change GRC block name text to match new class name., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 19/39: fec: LDPC: renaming some of the LDPC classes for clarity/consistency.,
git <=
- [Commit-gnuradio] [gnuradio] 09/39: fec: LDPC: Adding scripts to generate matrices for encoder., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 18/39: fec: LDPC: Updates to LDPC-related matrix classes., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 01/39: fec: LDPC: Adding class for LDPC parity check matrix., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 16/39: fec: LDPC: updates for LDPC functionality., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 22/39: fec: LDPC: Updating decoder to handle parity bits either first or last., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 28/39: qtgui: fixes calculation of BPSK BER curve., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 05/39: fec: LDPC: Adding LDPC encoder variable., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 34/39: fec: LDPC: changing namespace of ldpc_encoder back., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 30/39: fec: Updated docs for Forward Error Correction section in manual., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 32/39: fec: LDPC: removing apps until we can fix them up properly., git, 2015/10/15