IT++ 4.3.1
|
Block LDPC Generator class. More...
#include <itpp/comm/ldpc.h>
Public Member Functions | |
BLDPC_Generator (const std::string type="BLDPC") | |
Default constructor. | |
BLDPC_Generator (const BLDPC_Parity *const H, const std::string type="BLDPC") | |
Parametrized constructor. | |
int | get_exp_factor () const |
Get expansion factor. | |
void | encode (const bvec &input, bvec &output) |
Generator specific encode function. | |
void | construct (const BLDPC_Parity *const H) |
Construct the BLDPC generator. | |
std::string | get_type () const |
Return generator type. | |
void | mark_initialized () |
Mark generator as initialized. | |
bool | is_initialized () const |
Check if generator is initialized. | |
Protected Member Functions | |
void | save (const std::string &filename) const |
Save generator data to a file. | |
void | load (const std::string &filename) |
Read generator data from a file. | |
Protected Attributes | |
GF2mat | H_enc |
Preprocessed parity check matrix. | |
int | N |
Codeword length = H_enc.cols() | |
int | M |
Number of parity check bits = H_enc.rows() | |
int | K |
Number of information bits = N-M. | |
int | Z |
Expansion factor. | |
Block LDPC Generator class.
|
inline |
itpp::BLDPC_Generator::BLDPC_Generator | ( | const BLDPC_Parity *const | H, |
const std::string | type = "BLDPC" ) |
Parametrized constructor.
Definition at line 1043 of file ldpc.cpp.
References construct(), H_enc, K, itpp::LDPC_Generator::LDPC_Generator(), M, N, and Z.
|
inline |
|
virtual |
Generator specific encode function.
Implements itpp::LDPC_Generator.
Definition at line 1051 of file ldpc.cpp.
References H_enc, itpp::LDPC_Generator::is_initialized(), it_assert, K, M, N, and Z.
void itpp::BLDPC_Generator::construct | ( | const BLDPC_Parity *const | H | ) |
Construct the BLDPC generator.
Definition at line 1087 of file ldpc.cpp.
References itpp::BLDPC_Parity::get_exp_factor(), itpp::LDPC_Parity::get_H(), H_enc, itpp::BLDPC_Parity::is_valid(), K, M, itpp::LDPC_Generator::mark_initialized(), N, and Z.
Referenced by BLDPC_Generator().
|
protectedvirtual |
Save generator data to a file.
Implements itpp::LDPC_Generator.
Definition at line 1140 of file ldpc.cpp.
References itpp::it_file::close(), itpp::LDPC_Generator::get_type(), H_enc, itpp::LDPC_Generator::is_initialized(), it_assert, itpp::LDPC_binary_file_version, M, N, itpp::GF2mat::set_row(), and Z.
|
protectedvirtual |
Read generator data from a file.
Implements itpp::LDPC_Generator.
Definition at line 1164 of file ldpc.cpp.
References itpp::it_ifile::close(), itpp::GF2mat::cols(), itpp::LDPC_Generator::get_type(), H_enc, it_assert, K, itpp::LDPC_binary_file_version, M, itpp::LDPC_Generator::mark_initialized(), N, itpp::GF2mat::rows(), and Z.
|
inlineinherited |
Return generator type.
Definition at line 537 of file ldpc.h.
Referenced by itpp::BLDPC_Generator::load(), itpp::LDPC_Generator_Systematic::load(), itpp::BLDPC_Generator::save(), and itpp::LDPC_Generator_Systematic::save().
|
inlineinherited |
Mark generator as initialized.
Definition at line 540 of file ldpc.h.
Referenced by itpp::BLDPC_Generator::construct(), itpp::LDPC_Generator_Systematic::construct(), itpp::BLDPC_Generator::load(), and itpp::LDPC_Generator_Systematic::load().
|
inlineinherited |
Check if generator is initialized.
Definition at line 543 of file ldpc.h.
Referenced by itpp::BLDPC_Generator::encode(), itpp::LDPC_Generator_Systematic::encode(), and itpp::BLDPC_Generator::save().
|
protected |
Preprocessed parity check matrix.
Definition at line 669 of file ldpc.h.
Referenced by BLDPC_Generator(), BLDPC_Generator(), construct(), encode(), load(), and save().
|
protected |
Codeword length = H_enc.cols()
Definition at line 670 of file ldpc.h.
Referenced by BLDPC_Generator(), BLDPC_Generator(), construct(), encode(), load(), and save().
|
protected |
Number of parity check bits = H_enc.rows()
Definition at line 671 of file ldpc.h.
Referenced by BLDPC_Generator(), BLDPC_Generator(), construct(), encode(), load(), and save().
|
protected |
Number of information bits = N-M.
Definition at line 672 of file ldpc.h.
Referenced by BLDPC_Generator(), BLDPC_Generator(), construct(), encode(), and load().
|
protected |
Expansion factor.
Definition at line 673 of file ldpc.h.
Referenced by BLDPC_Generator(), BLDPC_Generator(), construct(), encode(), get_exp_factor(), load(), and save().