#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... | |
|
inline |
Default constructor.
References gr::fec::encode().
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<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.
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<char> cldpc::get_systematic_bits | ( | std::vector< char > | in | ) |
Obtain systematic bits from "in".
bool cldpc::is_codeword | ( | const std::vector< char > | 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<char> cldpc::syndrome | ( | const std::vector< char > | in | ) |
Returns the syndrome for a given vector "in".