itpp::BLDPC_Generator Class Reference

Block LDPC Generator class. More...

`#include <itpp/comm/ldpc.h>`

Inheritance diagram for itpp::BLDPC_Generator:

## 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.

## Detailed Description

Block LDPC Generator class.

Author
  Adam Piatyszek

Note
  Please refer to the BLDPC_Parity class description for information on B-LDPC codes

Definition at line 644 of file ldpc.h.

## Constructor & Destructor Documentation

## BLDPC_Generator() [1/2]

itpp::BLDPC_Generator::BLDPC_Generator | ( | const std::string | type = `"BLDPC"` | ) |

inline

Default constructor.

Definition at line 648 of file ldpc.h.

## BLDPC_Generator() [2/2]

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().

## Member Function Documentation

## get_exp_factor()

int itpp::BLDPC_Generator::get_exp_factor | ( |  | ) | const

inline

Get expansion factor.

Definition at line 655 of file ldpc.h.

## encode()

void itpp::BLDPC_Generator::encode | ( | const bvec & | input,
|  | bvec & | output
| ) |  |

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.

## construct()

void itpp::BLDPC_Generator::construct | ( | const BLDPC_Parity *const | H | ) |

Construct the BLDPC generator.

Definition at line 1087 of file ldpc.cpp.

References itpp::GF2mat::add_rows(), itpp::GF2mat::cols(), 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, itpp::GF2mat::rows(), itpp::GF2mat::swap_rows(), and Z.

Referenced by BLDPC_Generator().

## save()

void itpp::BLDPC_Generator::save | ( | const std::string & | filename | ) | const

protected virtual

Save generator data to a file.

Implements itpp::LDPC_Generator.

Definition at line 1140 of file ldpc.cpp.

References itpp::it_file::close(), itpp::GF2mat::get_row(), itpp::GF2mat::get_submatrix(), itpp::LDPC_Generator::get_type(), H_enc, itpp::LDPC_Generator::is_initialized(), it_assert, itpp::LDPC_binary_file_version, M, N, and Z.

## load()

void itpp::BLDPC_Generator::load | ( | const std::string & | filename | ) |

protected virtual

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::concatenate_vertical(), itpp::LDPC_Generator::get_type(), H_enc, it_assert, K, itpp::LDPC_binary_file_version, M, itpp::LDPC_Generator::mark_initialized(), N, itpp::GF2mat::set(), and Z.

## get_type()

std::string itpp::LDPC_Generator::get_type | ( |  | ) | const

inline inherited

Return generator type.

Definition at line 537 of file ldpc.h.

Referenced by itpp::LDPC_Generator_Systematic::load(), load(), itpp::LDPC_Generator_Systematic::save(), and save().

## mark_initialized()

void itpp::LDPC_Generator::mark_initialized | ( |  | ) |

inline inherited

Mark generator as initialized.

Definition at line 540 of file ldpc.h.

Referenced by construct(), itpp::LDPC_Generator_Systematic::construct(), itpp::LDPC_Generator_Systematic::load(), and load().

## is_initialized()

bool itpp::LDPC_Generator::is_initialized | ( |  | ) | const

inline inherited

Check if generator is initialized.

Definition at line 543 of file ldpc.h.

Referenced by itpp::LDPC_Generator_Systematic::encode(), encode(), and save().

## Member Data Documentation

## H_enc

GF2mat itpp::BLDPC_Generator::H_enc

protected

Preprocessed parity check matrix.

Definition at line 669 of file ldpc.h.

Referenced by construct(), encode(), load(), and save().

## N

int itpp::BLDPC_Generator::N

protected

Codeword length = H_enc.cols()

Definition at line 670 of file ldpc.h.

Referenced by construct(), encode(), load(), and save().

## M

int itpp::BLDPC_Generator::M

protected

Number of parity check bits = H_enc.rows()

Definition at line 671 of file ldpc.h.

Referenced by construct(), encode(), load(), and save().

## K

int itpp::BLDPC_Generator::K

protected

Number of information bits = N-M.

Definition at line 672 of file ldpc.h.

Referenced by construct(), encode(), and load().

## Z

int itpp::BLDPC_Generator::Z

protected

Expansion factor.

Definition at line 673 of file ldpc.h.

Referenced by construct(), encode(), load(), and save().

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

- itpp/comm/ldpc.h
- itpp/comm/ldpc.cpp

Generated on Mon Apr 22 2024 09:45:27 for IT++ by Doxygen 1.9.8