#include <itpp/comm/bch.h>
Inheritance diagram for itpp::BCH:
Public Member Functions | |
BCH (int in_n, int in_k, int in_t, ivec genpolynom) | |
Initialize a (n,k)-code that can correct t errors. | |
virtual | ~BCH () |
Destructor. | |
virtual void | encode (const bvec &uncoded_bits, bvec &coded_bits) |
Encode a bvec of indata. | |
virtual bvec | encode (const bvec &uncoded_bits) |
Encode a bvec of indata. | |
virtual void | decode (const bvec &coded_bits, bvec &decoded_bits) |
Decode a bvec of coded data. | |
virtual bvec | decode (const bvec &coded_bits) |
Decode a bvec of coded data. | |
virtual void | decode (const vec &received_signal, bvec &output) |
Decode a vec of received data. | |
virtual bvec | decode (const vec &received_signal) |
Decode a vec of received data. | |
virtual double | get_rate () |
Get the code rate. |
The notation used is found in S. B. Wicker, "Error control systems for digital communication and storage", Appendix E, Prentice-Hall, 1995.
Example:
BCH bch(31,21,2,"3 5 5 1")
Definition at line 62 of file bch.h.
itpp::BCH::BCH | ( | int | in_n, | |
int | in_k, | |||
int | in_t, | |||
ivec | genpolynom | |||
) |
Initialize a (n,k)-code that can correct t errors.
Definition at line 41 of file bch.cpp.
References itpp::oct2bin(), and itpp::GFX::set().
void itpp::BCH::encode | ( | const bvec & | uncoded_bits, | |
bvec & | coded_bits | |||
) | [virtual] |
Encode a bvec of indata.
Implements itpp::Channel_Code.
Definition at line 56 of file bch.cpp.
References itpp::floor().
Referenced by encode().
bvec itpp::BCH::encode | ( | const bvec & | uncoded_bits | ) | [virtual] |
Encode a bvec of indata.
Implements itpp::Channel_Code.
Definition at line 84 of file bch.cpp.
References encode().
void itpp::BCH::decode | ( | const bvec & | coded_bits, | |
bvec & | decoded_bits | |||
) | [virtual] |
Decode a bvec of coded data.
Implements itpp::Channel_Code.
Definition at line 91 of file bch.cpp.
References itpp::GFX::clear(), itpp::divgfx(), itpp::floor(), and itpp::zeros_b().
Referenced by decode().
bvec itpp::BCH::decode | ( | const bvec & | coded_bits | ) | [virtual] |
Decode a bvec of coded data.
Implements itpp::Channel_Code.
Definition at line 189 of file bch.cpp.
References decode().
void itpp::BCH::decode | ( | const vec & | received_signal, | |
bvec & | output | |||
) | [virtual] |
Decode a vec of received data.
Implements itpp::Channel_Code.
Definition at line 198 of file bch.cpp.
References it_error.
bvec itpp::BCH::decode | ( | const vec & | received_signal | ) | [virtual] |
Decode a vec of received data.
Implements itpp::Channel_Code.
Definition at line 203 of file bch.cpp.
References it_error.
virtual double itpp::BCH::get_rate | ( | void | ) | [inline, virtual] |
Generated on Thu Apr 19 14:15:02 2007 for IT++ by Doxygen 1.5.1