GNU Radio Manual and C++ API Reference  3.10.9.1
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< uint8_t > encode (std::vector< uint8_t > 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< uint8_t > syndrome (const std::vector< uint8_t > in)
 Returns the syndrome for a given vector "in". More...
 
bool is_codeword (const std::vector< uint8_t > in)
 Returns true if "in" is a codeword, else false. More...
 
void set_alist (const alist _list)
 Set the variable _list. More...
 
std::vector< uint8_t > get_systematic_bits (std::vector< uint8_t > in)
 Obtain systematic bits from "in". More...
 

Constructor & Destructor Documentation

◆ cldpc() [1/3]

cldpc::cldpc ( )
inline

Default constructor.

◆ 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<uint8_t> cldpc::encode ( std::vector< uint8_t >  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<uint8_t> cldpc::get_systematic_bits ( std::vector< uint8_t >  in)

Obtain systematic bits from "in".

◆ is_codeword()

bool cldpc::is_codeword ( const std::vector< uint8_t >  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<uint8_t> cldpc::syndrome ( const std::vector< uint8_t >  in)

Returns the syndrome for a given vector "in".


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