commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 27/39: fec: LDPC: Adding doxygen tags + mor


From: git
Subject: [Commit-gnuradio] [gnuradio] 27/39: fec: LDPC: Adding doxygen tags + more documentation to header files.
Date: Thu, 15 Oct 2015 21:21:31 +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 fd599db99de30da872ab5b2e59fa5434d5751fc9
Author: tracierenea <address@hidden>
Date:   Fri Jun 5 22:28:42 2015 -0500

    fec: LDPC: Adding doxygen tags + more documentation to header files.
    
    Also cleaning up documentation in the GRC blocks.
---
 gr-fec/doc/fec.dox                                 |  2 +-
 gr-fec/grc/variable_ldpc_HorG_mtrx_object.xml      |  8 +-
 gr-fec/grc/variable_ldpc_R_U_mtrx_object.xml       |  8 +-
 gr-fec/grc/variable_ldpc_bit_flip_decoder.xml      |  2 +-
 gr-fec/grc/variable_ldpc_gen_mtrx_encoder.xml      |  2 +-
 gr-fec/include/gnuradio/fec/fec_mtrx.h             | 95 +++++++++++++++-------
 gr-fec/include/gnuradio/fec/ldpc_HorG_mtrx.h       | 59 ++++++++++++--
 gr-fec/include/gnuradio/fec/ldpc_R_U_encoder.h     | 27 ++++--
 gr-fec/include/gnuradio/fec/ldpc_R_U_mtrx.h        | 80 +++++++++++++++---
 .../include/gnuradio/fec/ldpc_bit_flip_decoder.h   | 45 +++++-----
 .../include/gnuradio/fec/ldpc_gen_mtrx_encoder.h   | 31 +++----
 11 files changed, 258 insertions(+), 101 deletions(-)

diff --git a/gr-fec/doc/fec.dox b/gr-fec/doc/fec.dox
index 2b6cf18..9d48214 100644
--- a/gr-fec/doc/fec.dox
+++ b/gr-fec/doc/fec.dox
@@ -365,7 +365,7 @@ going into an encoder and the number of bits coming out of 
a decoder.
 \section fec_examples FEC Examples
 
 \li ber_curve_gen.grc
-\li ber_curve_gen_ldpc
+\li ber_curve_gen_ldpc.grc
 \li ber_test.grc
 \li fecapi_decoders.grc
 \li fecapi_encoders.grc
diff --git a/gr-fec/grc/variable_ldpc_HorG_mtrx_object.xml 
b/gr-fec/grc/variable_ldpc_HorG_mtrx_object.xml
index 2c13b5b..afbe1f6 100644
--- a/gr-fec/grc/variable_ldpc_HorG_mtrx_object.xml
+++ b/gr-fec/grc/variable_ldpc_HorG_mtrx_object.xml
@@ -34,15 +34,15 @@ This variable can be used by:
   1) LDPC Generator Matrix Encoder Definition block
   2) LDPC Bit Flip Decoder Definition block
 
-A filename must be provided for a generator matrix in alist format. The format 
of alist files is described at: 
-http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html
-
-The provided alist file can contain either:
+Provide an alist file, which may contain either:
 
 1) Generator matrix, G, in the standard format G = [I P], where I is an 
identity matrix and P is the parity submatrix.
 
 or
 
 2) Parity matrix, H, in the standard format H = [P' I], where P' is the 
transpose of the parity submatrix and I is an identity matrix.
+
+The format of alist files is described at:
+http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html
     </doc>
 </block>
diff --git a/gr-fec/grc/variable_ldpc_R_U_mtrx_object.xml 
b/gr-fec/grc/variable_ldpc_R_U_mtrx_object.xml
index e72108c..020e79a 100644
--- a/gr-fec/grc/variable_ldpc_R_U_mtrx_object.xml
+++ b/gr-fec/grc/variable_ldpc_R_U_mtrx_object.xml
@@ -43,8 +43,12 @@ This variable can be used by:
 The format of alist files is described at:
 http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html
 
-The specific format of this parity check matrix is described by Richardson and 
Urbanke in Appendix A of their book: Modern Coding Theory (ISBN 
978-0-521-85229-6). There is one file in examples/fec called 
n_1800_k_0902_gap_28.alist which is used by the example flowgraph 
ber_curve_gen_ldpc.grc. There are more at 
target/lib/python2.7/dist-packages/gnuradio/fec/LDPC/.
+The specific format of this parity check matrix is described by Richardson and 
Urbanke in Appendix A of their book: Modern Coding Theory (ISBN 
978-0-521-85229-6). 
 
-To convert a parity matrix file to the appropriate format required for this 
encoder, use the python functions in 
target/lib/python2.7/dist-packages/gnuradio/fec/LDPC/Generate_LDPC_matrix.py.
+As an example, see the file 
{$target}/share/gnuradio/fec/ldpc/n_1800_k_0902_gap_28.alist, which is used by 
the FEC example flowgraph ber_curve_gen_ldpc.grc. 
+
+There is a small library of encoding-ready alist files at 
{$target}/share/gnuradio/fec/ldpc.
+
+To convert a parity check matrix to the appropriate format required for this 
encoder, use the python functions in 
{$target}/lib/python2.7/dist-packages/gnuradio/fec/LDPC/Generate_LDPC_matrix.py.
     </doc>
 </block>
diff --git a/gr-fec/grc/variable_ldpc_bit_flip_decoder.xml 
b/gr-fec/grc/variable_ldpc_bit_flip_decoder.xml
index 136efa8..2b407f3 100644
--- a/gr-fec/grc/variable_ldpc_bit_flip_decoder.xml
+++ b/gr-fec/grc/variable_ldpc_bit_flip_decoder.xml
@@ -79,7 +79,7 @@ This block creates a LDPC Bit Flip Decoder Definition 
variable.
 
 The decoder requires knowledge of the matrix used to create (encode) the 
codewords. In the LDPC FEC Matrix ID field, input the ID of either a:
   1) LDPC Matrix variable, or
-  2) LDPC Generator Matrix variable
+  2) LDPC R. U. Parity Check Matrix variable
 
 Be sure to specify the same matrix ID as the matrix that was used for encoding.
 
diff --git a/gr-fec/grc/variable_ldpc_gen_mtrx_encoder.xml 
b/gr-fec/grc/variable_ldpc_gen_mtrx_encoder.xml
index 3f2712b..c9f5055 100644
--- a/gr-fec/grc/variable_ldpc_gen_mtrx_encoder.xml
+++ b/gr-fec/grc/variable_ldpc_gen_mtrx_encoder.xml
@@ -73,7 +73,7 @@ This block creates a LDPC Generator Matrix Encoder Definition 
variable.
 
 LDPC Matrix ID: Provide the ID of a LDPC Matrix variable block.
 
-This encoder generates a codeword from the simple matrix multiplication 
equation:
+This encoder generates a codeword via simple matrix multiplication:
 codeword = G_transpose*info_word
 
     </doc>
diff --git a/gr-fec/include/gnuradio/fec/fec_mtrx.h 
b/gr-fec/include/gnuradio/fec/fec_mtrx.h
index f7caf62..d67748a 100644
--- a/gr-fec/include/gnuradio/fec/fec_mtrx.h
+++ b/gr-fec/include/gnuradio/fec/fec_mtrx.h
@@ -1,17 +1,17 @@
 /* -*- c++ -*- */
-/* 
+/*
  * Copyright 2015 Free Software Foundation, Inc.
- * 
+ *
  * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published 
- * by the Free Software Foundation; either version 3, or (at your 
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 3, or (at your
  * option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; see the file COPYING.  If not, write to
  * the Free Software Foundation, Inc., 51 Franklin Street,
@@ -23,7 +23,7 @@
 
 #include <gnuradio/fec/api.h>
 #include <string>
- 
+
 #include <gsl/gsl_matrix.h>
 #include <gsl/gsl_randist.h>
 #include <gsl/gsl_permutation.h>
@@ -33,55 +33,88 @@
 namespace gr {
   namespace fec {
     namespace code {
+
+      /*!
+       * \brief Base class for FEC matrix objects.
+       *
+       *
+       * \ingroup error_coding_blk
+       *
+       * \details
+       *
+       * Base class of ldpc_HorG_mtrx and ldpc_R_U_mtrx classes.
+       * The child objects can be either generator matrices or
+       * parity check matrices. This base class can be provided to
+       * the decoder ldpc_bit_flip_decoder, whereas the encoder
+       * classes ldpc_gen_mtrx_encoder and ldpc_R_U_encoder will
+       * not accept this base class; they require one of the child
+       * classes.
+       */
       class FEC_API fec_mtrx
       {
       protected:
-        // Constructor
+        //! Constructor
         fec_mtrx();
-        // Codeword length n
+
+        //! Codeword length n
         unsigned int d_n;
-        // Information word length k
+
+        //! Information word length k
         unsigned int d_k;
-        // Number of rows in the matrix read in from alist file
+
+        //! Number of rows in the matrix read in from alist file
         unsigned int d_num_rows;
-        // Number of columns in the matrix read in from alist file
+
+        //! Number of columns in the matrix read in from alist file
         unsigned int d_num_cols;
-        // GSL matrix structure for the parity check matrix
+
+        //! GSL matrix structure for the parity check matrix
         gsl_matrix *d_H_ptr;
-        // Read the matrix from a file in alist format
+
+        /*!
+         * \brief Read the matrix from a file in alist format
+         * \param filename Name of an alist file to use. The alist
+         *                 format is described at:
+         *                 
http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html
+         */
         gsl_matrix *read_matrix_from_file(const std::string filename);
-        // Flag for whether or not the parity bits come first or last
+
+        //! Flag for whether or not the parity bits come first or last
         bool d_par_bits_last;
-        
+
       public:
-        // Returns the parity check matrix H (needed by decoder)
+        //! Returns the parity check matrix H (needed by decoder)
         const gsl_matrix *H() const;
-        // Get the codeword length n
-        unsigned int n() const;
-        // Get the information word length k
-        unsigned int k() const;
 
-        ///////////////////////////////////
-        // TODO add a boolean for whether or not parity part comes first
-        ///////////////////////////////////
+        //!Get the codeword length n
+        unsigned int n() const;
 
+        //! Get the information word length k
+        unsigned int k() const;
 
-        // Subtract matrices using mod2 operation
+        //! Subtract matrices using mod2 operations
         gsl_matrix *add_matrices_mod2(const gsl_matrix *,
                                       const gsl_matrix *) const;
-        // Perform matrix multiplication using mod 2 operations
+
+        //! Multiply matrices using mod2 operations
         gsl_matrix *mult_matrices_mod2(const gsl_matrix *,
                                        const gsl_matrix *) const;
-        // Find the inverse of a square matrix using modulo 2
-        // operations
+
+        //! Invert a square matrix using mod2 operations
         gsl_matrix *calc_inverse_mod2(const gsl_matrix *) const;
-        // The decoder will need to know this
+
+        /*!
+         * \brief Get Boolean for whether or not parity bits come first or last
+         * \details
+         * The decoder will need to know if the parity bits are
+         * coming first or last
+         */
         bool parity_bits_come_last() const;
 
-        virtual ~fec_mtrx(); 
+        virtual ~fec_mtrx();
       };
     }
   }
 }
 
-#endif /* INCLUDED_fec_mtrx_H */
\ No newline at end of file
+#endif /* INCLUDED_fec_mtrx_H */
diff --git a/gr-fec/include/gnuradio/fec/ldpc_HorG_mtrx.h 
b/gr-fec/include/gnuradio/fec/ldpc_HorG_mtrx.h
index 42f67b8..bb54eb8 100644
--- a/gr-fec/include/gnuradio/fec/ldpc_HorG_mtrx.h
+++ b/gr-fec/include/gnuradio/fec/ldpc_HorG_mtrx.h
@@ -31,25 +31,72 @@
 namespace gr {
   namespace fec {
     namespace code {
+      /*!
+       * \brief Class for storing H or G matrix
+       * \ingroup error_coding_blk
+       *
+       * \details
+       * This class stores a GSL matrix variable, specifically
+       * either a:
+       *
+       * 1) Generator matrix, G, in the standard format G = [I P],
+       *    where I is an identity matrix and P is the parity
+       *    submatrix.
+       *
+       * or
+       *
+       * 2) Parity matrix, H, in the standard format H = [P' I],
+       *    where P' is the transpose of the parity submatrix and I
+       *    is an identity matrix.
+       *
+       * This variable can used by the ldpc_gen_mtrx_encoder and
+       * ldpc_bit_flip_decoder classes.
+       */
       class FEC_API ldpc_HorG_mtrx : public fec_mtrx
       {
       private:
         // GSL matrix structure for transpose of G
         gsl_matrix *d_G_transp_ptr;
-        // Swig needs the scope resolution operator here
+
+        // SWIG needs the scope resolution operator here
         gr::fec::code::fec_mtrx *d_base_ptr;
         
       public:
+        /*!
+         * \brief Constructor given alist file
+         * \details
+         * 1. Reads in the matrix from an alist file
+         * 2. Determines if the matrix format is G=[I P] or H=[P' I]
+         * 3. Solves for G transpose (will be used during encoding)
+         *
+         * \param filename Name of an alist file to use. The alist
+         *                 format is described at:
+         *                 
http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html
+         */
         ldpc_HorG_mtrx(const std::string filename);
-        // Default constructor, should not be used
+
+        //! Default constructor; should not be used
         ldpc_HorG_mtrx();
-        // Get the generator matrix (used during encoding)
+
+        //! Get the generator matrix (used during encoding)
         const gsl_matrix *G_transpose() const;
-        // A pointer to make swig work for the ldpc_bit_flip_decoder
-        // GRC block
+
+        /*!
+         * \brief A pointer to make SWIG work
+         * \details
+         * For some reason, SWIG isn't accepting a pointer to this
+         * child class for the make function of the
+         * ldpc_bit_flip_decoder; it's expecting a pointer to the
+         * base class. So, this is just a workaround for SWIG and
+         * GRC.
+         */
         gr::fec::code::fec_mtrx *get_base_ptr();
 
-        // Destructor
+        /*!
+         * \brief Destructor
+         * \details
+         * Calls the gsl_matrix_free function to free memory.
+         */
         virtual ~ldpc_HorG_mtrx();
       };
     }
diff --git a/gr-fec/include/gnuradio/fec/ldpc_R_U_encoder.h 
b/gr-fec/include/gnuradio/fec/ldpc_R_U_encoder.h
index ec2d21f..e7c4698 100644
--- a/gr-fec/include/gnuradio/fec/ldpc_R_U_encoder.h
+++ b/gr-fec/include/gnuradio/fec/ldpc_R_U_encoder.h
@@ -30,27 +30,38 @@ namespace gr {
     namespace code {
 
       /*!
-       * \brief LDPC Generic Encoder (method by Richardson & Urbanke)
+       * \brief LDPC generic encoder (method by Richardson & Urbanke)
        * \ingroup error_coding_blk
        *
        * \details
        * A generic LDPC encoder class. This encoding method is
        * described by Richardson and Urbanke in Appendix A of their
        * book Modern Coding Theory (ISBN 978-0-521-85229-6).
+       *
+       * Summary of the steps:
+       * 1. Let \f$\overline{s}\f$ be the information word to be
+       *    encoded.
+       * 2. Define 
\f$\overline{p}_{1}^{T}=T\left[A\overline{p}_{2}^{T}+B\overline{s}^{T}\right]\f$
+       * 3. Define 
\f$\overline{p}_{2}^{T}=-\phi^{-1}\left[D-ET^{-1}B\right]\overline{s}^{T}\f$
+       * 4. Taking advantage of \f$T\f$ being square and upper
+       *    triangular, use back substitution to solve for
+       *    \f$\overline{p}_{1}\f$ and \f$\overline{p}_{2}\f$.
+       * 5. The codeword is given by: 
\f$\overline{x}=\left[\overline{p}_{1},\overline{p}_{2},\overline{s}\right]\f$
        */
       class FEC_API ldpc_R_U_encoder : virtual public generic_encoder
       {
       public:
         /*!
-         * Build an encoding FEC API object.
-         *
-         * \param H_obj The LDPC parity check matrix object to use
-         *        for encoding. This is the same matrix used for
-         *        decoding. 
+         * \brief Build an encoding FEC API object.
+         * \param H_obj The ldpc_R_U_mtrx object to use for
+         *              encoding. The decoder must be given this
+         *              same matrix object of course.
         */
         static generic_encoder::sptr make(const ldpc_R_U_mtrx *H_obj);
 
         /*!
+         * \brief  Sets the uncoded frame size to \p frame_size.
+         * \details
          * Sets the uncoded frame size to \p frame_size. If \p
          * frame_size is greater than the value given to the
          * constructor, the frame size will be capped by that initial
@@ -59,9 +70,7 @@ namespace gr {
          */
         virtual bool set_frame_size(unsigned int frame_size) = 0;
 
-        /*!
-         * Returns the coding rate of this encoder.
-         */
+        //! Returns the coding rate of this decoder.
         virtual double rate() = 0;
       };
     } /* namespace code */
diff --git a/gr-fec/include/gnuradio/fec/ldpc_R_U_mtrx.h 
b/gr-fec/include/gnuradio/fec/ldpc_R_U_mtrx.h
index 69b065b..ec495cc 100644
--- a/gr-fec/include/gnuradio/fec/ldpc_R_U_mtrx.h
+++ b/gr-fec/include/gnuradio/fec/ldpc_R_U_mtrx.h
@@ -26,13 +26,30 @@
 namespace gr {
   namespace fec {
     namespace code {
+      /*!
+       * \brief Parity check matrix in Richardson/Urbanke format
+       * \ingroup error_coding_blk
+       *
+       * \details
+       * This class stores a matrix for use with the
+       * ldpc_R_U_encoder class. It must be of the specific format
+       * described by Richardson and Urbanke in Appendix A of their
+       * book: Modern Coding Theory (ISBN 978-0-521-85229-6). The
+       * form is:
+       * \f[\left[\begin{array}{ccc} T & A & B\\ E & C & D 
\end{array}\right]\f]
+       * This class can be used with the ldpc_bit_flip_decoder.
+       *
+       * To convert a parity check matrix to this format, use the
+       * python functions in:
+       * 
/lib/python2.7/dist-packages/gnuradio/fec/LDPC/Generate_LDPC_matrix.py.
+       */
       class FEC_API ldpc_R_U_mtrx : public fec_mtrx
       {
       private:
         // Gap (assumes matrix is in TABECD form)
         unsigned int d_gap;
-        // These are the submatrices found during preprocessing
-        // which are used for encoding. 
+
+        // Submatrices found during preprocessing, used for encoding
         gsl_matrix_view d_A_view;
         gsl_matrix_view d_B_view;
         gsl_matrix_view d_D_view;
@@ -40,28 +57,71 @@ namespace gr {
         gsl_matrix_view d_T_view;
         gsl_matrix *d_phi_inverse_ptr;
 
-        // Swig needs the scope resolution operator here
+        // Swig needs the scope resolution operator here (for some
+        // reason...?)
         gr::fec::code::fec_mtrx *d_base_ptr;
 
-        // Set the submatrix variables needed for encoding
+        //! Sets the submatrix variables needed for encoding
         void set_parameters_for_encoding();
-
         
       public:
+        /*!
+         * \brief Constructor given alist file and gap
+         * \param filename Name of an alist file to use. The alist
+         *                 format is described at:
+         *                 
http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html
+         * \param gap A property of the matrix being used. For alist
+         *            files distributed with GNU Radio, this value
+         *            is specified in the alist filename. The gap is
+         *            found during the matrix preprocessing
+         *            algorithm. It is equal to the number of rows in
+         *            submatrices E, C and D.
+         */
         ldpc_R_U_mtrx(const std::string filename, unsigned int gap);
-        // Default constructor, should not be used
+
+        //! Default constructor, should not be used
         ldpc_R_U_mtrx();
-        // Access the matrices needed during encoding
+
+        //! Access the A submatrix, needed during encoding
         const gsl_matrix *A() const;
+
+        //! Access the B submatrix, needed during encoding
         const gsl_matrix *B() const;
+
+        //! Access the D submatrix, needed during encoding
         const gsl_matrix *D() const;
+
+        //! Access the E submatrix, needed during encoding
         const gsl_matrix *E() const;
+
+        //! Access the T submatrix, needed during encoding
         const gsl_matrix *T() const;
+
+        /*!
+         * \brief Access the \f$\phi^{-1}\f$ matrix
+         * \details
+         * Access the matrix \f$\phi^{-1}\f$, which is needed during
+         * encoding. \f$\phi\f$ is defined as:
+         * \f$\phi=C-ET^{-1}A\f$.
+         */
         const gsl_matrix *phi_inverse() const;
-        // A pointer to make swig work for the ldpc_bit_flip_decoder
-        // GRC block
+
+        /*!
+         * \brief A pointer to make SWIG work
+         * \details
+         * For some reason, SWIG isn't accepting a pointer to this
+         * child class for the make function of the
+         * ldpc_bit_flip_decoder; it's expecting a pointer to the
+         * base class. So, this is just a workaround for SWIG and
+         * GRC.
+         */
         gr::fec::code::fec_mtrx *get_base_ptr();
-        // Destructor
+
+        /*!
+         * \brief Destructor
+         * \details
+         * Calls the gsl_matrix_free function to free memory
+         */
         virtual ~ldpc_R_U_mtrx();
       };
     }
diff --git a/gr-fec/include/gnuradio/fec/ldpc_bit_flip_decoder.h 
b/gr-fec/include/gnuradio/fec/ldpc_bit_flip_decoder.h
index ef4b967..57ee89c 100644
--- a/gr-fec/include/gnuradio/fec/ldpc_bit_flip_decoder.h
+++ b/gr-fec/include/gnuradio/fec/ldpc_bit_flip_decoder.h
@@ -30,44 +30,47 @@ namespace gr {
   namespace fec {
     namespace code {
       /*!
-       * \brief LDPC Bit Flip Decoding class.
+       * \brief LDPC bit flip decoding class
        * \ingroup error_coding_blk
        *
        * \details
        * A hard decision bit flip decoder class for decoding low
-       * density parity check (LDPC) codes. The simple algorithm is:
+       * density parity check (LDPC) codes. The decoder requires
+       * knowledge of the matrix used to create (encode) the
+       * codewords.  The simple algorithm is:
        *
        * 1. Compute parity checks on all of the bits.
        * 2. Flip the bit(s) associated with the most failed parity
        *    checks.
-       * 3. Check to see if new word is valid. If not, go back to 1. 
-       * 4. Repeat until valid codeword is found or some maximum
-       *    number of iterations is reached. 
+       * 3. Check to see if new word is valid. (\f$\overline{x}\f$
+       *    is a codeword if and only if
+       *    \f$\mathbf{H}\bar{x}^{T}=\overline{0}\f$.) If it is not
+       *    valid, go back to step 1.
+       * 4. Repeat until valid codeword is found or the maximum
+       *    number of iterations is reached.
        */
       class FEC_API ldpc_bit_flip_decoder : virtual public generic_decoder
       {
       public:
 
         /*!
-         * Build a bit flip decoding FEC API object.
-         *
-         * \param parity_check_matrix The LDPC parity check matrix 
-         *        to use for decoding. This is the same matrix used
-         *        for encoding. 
-         * \param max_iterations Maximum number of iterations to
-         *        complete during the decoding algorithm. The 
-         *        default is 100 because this seemed to be sufficient
-         *        during testing.
-         * \param frame_size Number of bits in each information word.
-         *        Usually denoted "k" in the literature.
-         * \param n Number of bits in each transmitted codeword, 
-         *        usually denoted "n" in the literature.
+         * \brief Build a bit flip decoding FEC API object.
+         * \param mtrx_obj The LDPC parity check matrix to use for
+         *        decoding. This should be the same matrix used for
+         *        encoding. Provide either a ldpc_R_U_mtrx or
+         *        a ldpc_HorG_mtrx object.
+         * \param max_iter Maximum number of iterations to complete
+         *        during the decoding algorithm. The default is 100
+         *        because this seemed to be sufficient during
+         *        testing. May be increased for possibly better
+         *        performance, but may slow things down.
          */
-
         static generic_decoder::sptr make(const fec_mtrx *mtrx_obj,
                                           unsigned int max_iter=100);
 
         /*!
+         * \brief  Sets the uncoded frame size to \p frame_size.
+         * \details
          * Sets the uncoded frame size to \p frame_size. If \p
          * frame_size is greater than the value given to the
          * constructor, the frame size will be capped by that initial
@@ -76,9 +79,7 @@ namespace gr {
          */
         virtual bool set_frame_size(unsigned int frame_size) = 0;
 
-        /*!
-         * Returns the coding rate of this decoder.
-         */
+        //! Returns the coding rate of this decoder.
         virtual double rate() = 0;
 
       };
diff --git a/gr-fec/include/gnuradio/fec/ldpc_gen_mtrx_encoder.h 
b/gr-fec/include/gnuradio/fec/ldpc_gen_mtrx_encoder.h
index 3dad2cb..c14db94 100644
--- a/gr-fec/include/gnuradio/fec/ldpc_gen_mtrx_encoder.h
+++ b/gr-fec/include/gnuradio/fec/ldpc_gen_mtrx_encoder.h
@@ -30,29 +30,34 @@ namespace gr {
     namespace code {
 
       /*!
-       * \brief LDPC Generic Encoder (method by Richardson & Urbanke)
+       * \brief LDPC generator matrix encoder
        * \ingroup error_coding_blk
        *
        * \details
        * A standard encoder class. This method is discussed in many
-         textbooks. One is: Turbo Coding for Satellite and Wireless
-         Communications by Soleymani, Gao, and Vilaipornsawai.
-         The generator matrix G must be in systematic form, 
-         G = [I P], where I is an identity matrix and P is the
-         parity submatrix.
+       * textbooks; one is: Turbo Coding for Satellite and Wireless
+       * Communications by Soleymani, Gao, and Vilaipornsawai.
+       * Given a generator matrix in systematic form,
+       * \f$\mathbf{G}=\left[\mathbf{I}_{k}|\mathbf{P}\right]\f$,
+       * where \f$\mathbf{I}_{k}\f$ is the identity matrix and
+       * \f$\mathbf{P}\f$ is the parity submatrix, the information
+       * word \f$\bar{s}\f$ is encoded into a codeword
+       * \f$\overline{x}\f$ via:
+       * \f[\overline{x}=\mathbf{G}^{T}\bar{s}\f]
        */
       class FEC_API ldpc_gen_mtrx_encoder : virtual public generic_encoder
       {
       public:
         /*!
-         * Build an encoding FEC API object.
-         *
-         * \param G_obj The generator matrix object to use
-         *        for encoding.
-        */
+         * \brief Build an encoding FEC API object.
+         * \param M_obj The ldpc_HorG_mtrx object to use for
+         *              encoding.
+         */
         static generic_encoder::sptr make(const ldpc_HorG_mtrx *M_obj);
 
         /*!
+         * \brief  Sets the uncoded frame size to \p frame_size.
+         * \details
          * Sets the uncoded frame size to \p frame_size. If \p
          * frame_size is greater than the value given to the
          * constructor, the frame size will be capped by that initial
@@ -61,9 +66,7 @@ namespace gr {
          */
         virtual bool set_frame_size(unsigned int frame_size) = 0;
 
-        /*!
-         * Returns the coding rate of this encoder.
-         */
+        //! Returns the coding rate of this encoder.
         virtual double rate() = 0;
       };
     } /* namespace code */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]