itpp::LDPC_Generator_Systematic Class Reference

Systematic LDPC Generator class. More...

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

Inheritance diagram for itpp::LDPC_Generator_Systematic:

## Public Member Functions

| LDPC_Generator_Systematic ()
| Default constructor.
| LDPC_Generator_Systematic (LDPC_Parity *const H, bool natural_ordering=false, const ivec &ind="")
| Parametrized constructor.
virtual | ~LDPC_Generator_Systematic ()
| Virtual destructor.
virtual void | encode (const bvec &input, bvec &output)
| Generator specific encode function.
ivec | construct (LDPC_Parity *const H, bool natural_ordering=false, const ivec &ind="")
| Construct systematic generator matrix.
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

virtual void | save (const std::string &filename) const
| Save generator data to a file.
virtual void | load (const std::string &filename)
| Read generator data from a file.

## Detailed Description

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.

Note
  Please refer to the tutorials for examples of how to use this class.

Author
  Erik G. Larsson and Adam Piatyszek

Definition at line 570 of file ldpc.h.

## Constructor & Destructor Documentation

## LDPC_Generator_Systematic() [1/2]

itpp::LDPC_Generator_Systematic::LDPC_Generator_Systematic | ( |  | ) |

inline

Default constructor.

Definition at line 574 of file ldpc.h.

## LDPC_Generator_Systematic() [2/2]

itpp::LDPC_Generator_Systematic::LDPC_Generator_Systematic | ( | LDPC_Parity *const | H,
|  | bool | natural_ordering = `false`,
|  | const ivec & | ind = `""`
| ) |  |

Parametrized constructor.

Definition at line 884 of file ldpc.cpp.

References construct().

## ~LDPC_Generator_Systematic()

virtual itpp::LDPC_Generator_Systematic::~LDPC_Generator_Systematic | ( |  | ) |

inlinevirtual

Virtual destructor.

Definition at line 581 of file ldpc.h.

## Member Function Documentation

## encode()

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

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(), it_assert, and itpp::Array< T >::size().

## construct()

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.

Parameters

  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.

Returns
  This function returns the permutation vector `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`.

Note
  This function modifies the parity check matrix `H`. Its columns may be sorted so that it gets the structure where is square and invertible. The computed generator then satisfies .

Definition at line 894 of file ldpc.cpp.

References itpp::LDPC_Parity::get_H(), itpp::LDPC_Parity::get_ncheck(), itpp::LDPC_Parity::get_nvar(), itpp::gf2dense_eye(), it_assert_debug, it_error_if, it_info_debug, itpp::length(), itpp::LDPC_Generator::mark_initialized(), itpp::randu(), itpp::LDPC_Parity::set(), itpp::GF2mat::transpose(), and itpp::transpose().

Referenced by LDPC_Generator_Systematic().

## save()

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

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.

## load()

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

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

## get_type()

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

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

## mark_initialized()

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

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

## is_initialized()

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

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

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

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

Generated on Mon Jun 10 2024 11:49:36 for IT++ by Doxygen 1.9.8