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