GNU Radio Manual and C++ API Reference  3.8.1.0
The Free & Open Software Radio Ecosystem
cldpc Class Reference

#include <gnuradio/fec/cldpc.h>

Public Member Functions

 cldpc ()
 Default constructor. More...
 
 cldpc (const GF2Mat X)
 Constructs the LDPC class from given GF2mat X. More...
 
 cldpc (const alist _list)
 Constructs the class from the given alist _list. More...
 
void print_permute ()
 Prints the variable permute. More...
 
std::vector< char > encode (std::vector< char > dataword)
 Encode the given vector dataword. More...
 
int dimension ()
 Returns the dimension of the code. More...
 
GF2Mat get_H ()
 Returns the parity check matrix H. More...
 
GF2Mat get_G ()
 Returns the matrix G used in encoding. More...
 
int get_M ()
 Returns the variable M. More...
 
int get_N ()
 Returns the variable N. More...
 
std::vector< char > syndrome (const std::vector< char > in)
 Returns the syndrome for a given vector "in". More...
 
bool is_codeword (const std::vector< char > in)
 Returns true if "in" is a codeword, else false. More...
 
void set_alist (const alist _list)
 Set the variable _list. More...
 
std::vector< char > get_systematic_bits (std::vector< char > in)
 Obtain systematic bits from "in". More...
 

Constructor & Destructor Documentation

◆ cldpc() [1/3]

cldpc::cldpc ( )
inline

Default constructor.

References gr::fec::encode().

◆ cldpc() [2/3]

cldpc::cldpc ( const GF2Mat  X)

Constructs the LDPC class from given GF2mat X.

◆ cldpc() [3/3]

cldpc::cldpc ( const alist  _list)

Constructs the class from the given alist _list.

Member Function Documentation

◆ dimension()

int cldpc::dimension ( )

Returns the dimension of the code.

◆ encode()

std::vector<char> cldpc::encode ( std::vector< char >  dataword)

Encode the given vector dataword.

dataword is of length K where K is the dimension of the code. The function returns a vector of length N where N is the block-length of the code.

For encoding a G matrix in the form [I P] is obtained from the parity matrix H, by (a) Column permutations, (b) Row additions and (c) Row permutations. Details of encoding is given in section A.1 of the reference given below.

  • "Modern Coding Theory", T Richardson and R Urbanke.

◆ get_G()

GF2Mat cldpc::get_G ( )

Returns the matrix G used in encoding.

◆ get_H()

GF2Mat cldpc::get_H ( )

Returns the parity check matrix H.

◆ get_M()

int cldpc::get_M ( )

Returns the variable M.

◆ get_N()

int cldpc::get_N ( )

Returns the variable N.

◆ get_systematic_bits()

std::vector<char> cldpc::get_systematic_bits ( std::vector< char >  in)

Obtain systematic bits from "in".

◆ is_codeword()

bool cldpc::is_codeword ( const std::vector< char >  in)

Returns true if "in" is a codeword, else false.

◆ print_permute()

void cldpc::print_permute ( )

Prints the variable permute.

◆ set_alist()

void cldpc::set_alist ( const alist  _list)

Set the variable _list.

◆ syndrome()

std::vector<char> cldpc::syndrome ( const std::vector< char >  in)

Returns the syndrome for a given vector "in".


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