GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
gr::fec::code::ldpc_G_matrix Class Referenceabstract

Class for storing H or G matrix. More...

#include <gnuradio/fec/ldpc_G_matrix.h>

Public Types

typedef std::shared_ptr< ldpc_G_matrixsptr
 

Public Member Functions

void encode (unsigned char *outbuffer, const unsigned char *inbuffer) const override=0
 Encode inbuffer with LDPC H matrix into outbuffer. More...
 
void decode (unsigned char *outbuffer, const float *inbuffer, unsigned int frame_size, unsigned int max_iterations) const override=0
 Decode inbuffer with LDPC H matrix into outbuffer. More...
 
unsigned int n () const override=0
 Get the codeword length n. More...
 
unsigned int k () const override=0
 Get the information word length k. More...
 
- Public Member Functions inherited from gr::fec::code::fec_mtrx
virtual ~fec_mtrx ()
 
virtual void encode (unsigned char *outbuffer, const unsigned char *inbuffer) const =0
 Encode inbuffer with LDPC H matrix into outbuffer. More...
 
virtual void decode (unsigned char *outbuffer, const float *inbuffer, unsigned int frame_size, unsigned int max_iterations) const =0
 Decode inbuffer with LDPC H matrix into outbuffer. More...
 
virtual unsigned int n () const =0
 Get the codeword length n. More...
 
virtual unsigned int k () const =0
 Get the information word length k. More...
 

Static Public Member Functions

static sptr make (const std::string filename)
 Constructor given alist file. More...
 

Additional Inherited Members

- Protected Member Functions inherited from gr::fec::code::fec_mtrx
 fec_mtrx (void)
 

Detailed Description

Class for storing H or G matrix.

This class stores a 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.

Member Typedef Documentation

◆ sptr

Member Function Documentation

◆ decode()

void gr::fec::code::ldpc_G_matrix::decode ( unsigned char *  outbuffer,
const float *  inbuffer,
unsigned int  frame_size,
unsigned int  max_iterations 
) const
overridepure virtual

Decode inbuffer with LDPC H matrix into outbuffer.

Implements gr::fec::code::fec_mtrx.

◆ encode()

void gr::fec::code::ldpc_G_matrix::encode ( unsigned char *  outbuffer,
const unsigned char *  inbuffer 
) const
overridepure virtual

Encode inbuffer with LDPC H matrix into outbuffer.

Implements gr::fec::code::fec_mtrx.

◆ k()

unsigned int gr::fec::code::ldpc_G_matrix::k ( ) const
overridepure virtual

Get the information word length k.

Implements gr::fec::code::fec_mtrx.

◆ make()

static sptr gr::fec::code::ldpc_G_matrix::make ( const std::string  filename)
static

Constructor given alist file.

  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)
Parameters
filenameName of an alist file to use. The alist format is described at: http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html

◆ n()

unsigned int gr::fec::code::ldpc_G_matrix::n ( ) const
overridepure virtual

Get the codeword length n.

Implements gr::fec::code::fec_mtrx.


The documentation for this class was generated from the following file: