Systematic LDPC Generator class. More...
#include <itpp/comm/ldpc.h>
Public Member Functions | |
LDPC_Generator_Systematic () | |
Default constructor. More... | |
LDPC_Generator_Systematic (LDPC_Parity *const H, bool natural_ordering=false, const ivec &ind="") | |
Parametrized constructor. More... | |
virtual | ~LDPC_Generator_Systematic () |
Virtual destructor. More... | |
virtual void | encode (const bvec &input, bvec &output) |
Generator specific encode function. More... | |
ivec | construct (LDPC_Parity *const H, bool natural_ordering=false, const ivec &ind="") |
Construct systematic generator matrix. More... | |
std::string | get_type () const |
Return generator type. More... | |
void | mark_initialized () |
Mark generator as initialized. More... | |
bool | is_initialized () const |
Check if generator is initialized. More... | |
Protected Member Functions | |
virtual void | save (const std::string &filename) const |
Save generator data to a file. More... | |
virtual void | load (const std::string &filename) |
Read generator data from a file. More... | |
Systematic LDPC Generator class.
A generator is basically a dense GF(2) matrix with a constructor that can create the generator matrix from a parity check matrix.
|
inline |
itpp::LDPC_Generator_Systematic::LDPC_Generator_Systematic | ( | LDPC_Parity *const | H, |
bool | natural_ordering = false , |
||
const ivec & | ind = "" |
||
) |
|
inlinevirtual |
|
virtual |
Generator specific encode function.
Implements itpp::LDPC_Generator.
Definition at line 1027 of file ldpc.cpp.
References itpp::GF2mat::cols(), itpp::concat(), itpp::LDPC_Generator::is_initialized(), and it_assert.
ivec itpp::LDPC_Generator_Systematic::construct | ( | LDPC_Parity *const | H, |
bool | natural_ordering = false , |
||
const ivec & | ind = "" |
||
) |
Construct systematic generator matrix.
This function constructs a systematic generator matrix from a parity check matrix (LDPC_Parity
). The order of the columns is randomized unless otherwise requested via the natural_ordering
parameter.
H | A pointer to the parity check matrix H |
natural_ordering | If this flag is true, the columns are not randomly reordered (no interleaving applied), i.e. the function tries so far as possible to avoid permuting columns at all. The permutation takes place only if absolutely necessary. |
ind | Vector of column indices (variable nodes) to avoid in the systematic part. If this vector is supplied, the algorithm then avoids to use variable nodes corresponding to this index vector as systematic bits. This can be used for example to avoid using variable nodes of a low degree as systematic bits. This parameter is ignored if the natural_ordering flag is set. |
P
on the variable nodes that was necessary to construct a full rank generator. This is the permutation which effectively has been applied to the columns of H
. The k-th column of the original H
is the P(k)-th
column of the rearranged H
.H
. Its columns may be sorted so that it gets the structure Definition at line 894 of file ldpc.cpp.
References itpp::GF2mat::concatenate_horizontal(), itpp::GF2mat::get(), itpp::GF2mat::get_col(), itpp::LDPC_Parity::get_H(), itpp::LDPC_Parity::get_ncheck(), itpp::LDPC_Parity::get_nvar(), itpp::gf2dense_eye(), itpp::GF2mat::inverse(), it_assert_debug, it_error_if, it_info_debug, itpp::length(), itpp::LDPC_Generator::mark_initialized(), itpp::randu(), itpp::LDPC_Parity::set(), itpp::GF2mat::T_fact(), itpp::GF2mat::T_fact_update_addcol(), itpp::GF2mat::transpose(), and itpp::transpose().
Referenced by LDPC_Generator_Systematic().
|
protectedvirtual |
Save generator data to a file.
Implements itpp::LDPC_Generator.
Definition at line 996 of file ldpc.cpp.
References itpp::it_file::close(), itpp::LDPC_Generator::get_type(), it_assert, and itpp::LDPC_binary_file_version.
|
protectedvirtual |
Read generator data from a file.
Implements itpp::LDPC_Generator.
Definition at line 1009 of file ldpc.cpp.
References itpp::it_ifile::close(), itpp::LDPC_Generator::get_type(), it_assert, itpp::LDPC_binary_file_version, and itpp::LDPC_Generator::mark_initialized().
|
inlineinherited |
Return generator type.
Definition at line 537 of file ldpc.h.
Referenced by load(), itpp::BLDPC_Generator::load(), save(), and itpp::BLDPC_Generator::save().
|
inlineinherited |
Mark generator as initialized.
Definition at line 540 of file ldpc.h.
Referenced by itpp::BLDPC_Generator::construct(), construct(), load(), and itpp::BLDPC_Generator::load().
|
inlineinherited |
Check if generator is initialized.
Definition at line 543 of file ldpc.h.
Referenced by encode(), itpp::BLDPC_Generator::encode(), and itpp::BLDPC_Generator::save().
Generated on Sun Jun 5 2022 21:26:42 for IT++ by Doxygen 1.9.3