Reed-Solomon Codes. More...
#include <itpp/comm/reedsolomon.h>
Public Member Functions | |
Reed_Solomon (int in_m, int in_t, bool sys=false, int in_b=1) | |
virtual | ~Reed_Solomon () |
Destructor. | |
virtual void | encode (const bvec &uncoded_bits, bvec &coded_bits) |
Encoder function. | |
virtual bvec | encode (const bvec &uncoded_bits) |
Encoder function. | |
virtual bool | decode (const bvec &coded_bits, const ivec &erasure_positions, bvec &decoded_message, bvec &cw_isvalid) |
Decode the RS code bits. Return false if there has been any decoding failure. | |
virtual bool | decode (const bvec &coded_bits, bvec &decoded_message, bvec &cw_isvalid) |
Decode the RS code bits. Return false if there has been any decoding failure. | |
virtual void | decode (const bvec &coded_bits, bvec &decoded_bits) |
Decoder a bvec of coded data. This function is kept for backward compatibility. Better use. | |
virtual bvec | decode (const bvec &coded_bits) |
Decoder a bvec of coded data. This function is kept for backward compatibility. Better use. | |
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 () const |
Gets the rate of the RS-code. | |
Reed_Solomon & | operator= (const Reed_Solomon &) |
Dummy assignment operator - MSVC++ warning C4512. | |
Protected Attributes | |
GFX | g |
The generator polynomial of the RS code. | |
const bool | systematic |
Whether or not the code is systematic. | |
int | m |
int | t |
int | k |
int | n |
int | q |
int | b |
Reed-Solomon Codes.
Uses the Berlkamp-Massey algorithm for decoding as described in: S. B. Wicker, "Error Control Systems for digital communication and storage," Prentice Hall.
The code is - ary of length capable of correcting errors.
Definition at line 51 of file reedsolomon.h.
itpp::Reed_Solomon::Reed_Solomon | ( | int | in_m, |
int | in_t, | ||
bool | sys = false , |
||
int | in_b = 1 |
||
) |
Class constructor for the - ary, error correcting RS-code. The generator polynomial will be $g(x)={i=0}^{2t-1}(x-^{b+i})$, where $$ is a root of the primitive polynomial of itpp::GF
.
Definition at line 55 of file reedsolomon.cpp.
References b, g, it_assert, k, m, n, itpp::pow2i(), q, itpp::GFX::set(), and t.
|
virtual |
Decode the RS code bits. Return false if there has been any decoding failure.
The coded_bits
are block-wise decoded into decoded_message
messages. If there has been any decoding failure, the function will return false
. If this happened in the n-th block, then cw_isvalid(n)
will be set to false
(zero-indexed). In case of a systematic code the systematic bits will be extracted and presented in the corresponding block of decoded_message
. This is better than just presenting zeros, which is done in case of a decoding failure of non-systematic codes.
For erasure decoding the indices of erased positions need to be passed in erasure_positions
as indices to the erased (not bit!).
Definition at line 121 of file reedsolomon.cpp.
References b, itpp::concat(), itpp::divgfx(), itpp::floor_i(), itpp::formal_derivate(), g, it_assert, k, m, itpp::max(), n, itpp::ones_i(), q, itpp::GFX::set_degree(), systematic, t, and itpp::zeros_b().
Referenced by decode().
|
virtual |
Decode the RS code bits. Return false if there has been any decoding failure.
The coded_bits
are block-wise decoded into decoded_message
messages. If there has been any decoding failure, the function will return false
. If this happened in the n-th block, then cw_isvalid(n)
will be set to false
(zero-indexed). In case of a systematic code the systematic bits will be extracted and presented in the corresponding block of decoded_message
. This is better than just presenting zeros, which is done in case of a decoding failure of non-systematic codes.
Definition at line 278 of file reedsolomon.cpp.
References decode().
|
virtual |
Decoder a bvec
of coded data. This function is kept for backward compatibility. Better use.
.
Implements itpp::Channel_Code.
Definition at line 284 of file reedsolomon.cpp.
References decode(), k, m, and itpp::zeros_b().
|
virtual |
Decoder a bvec
of coded data. This function is kept for backward compatibility. Better use.
.
Implements itpp::Channel_Code.
Definition at line 297 of file reedsolomon.cpp.
References decode().
|
protected |
Internal encoder/decoder parameters
Definition at line 115 of file reedsolomon.h.
Referenced by decode(), encode(), and Reed_Solomon().
|
protected |
Internal encoder/decoder parameters
Definition at line 115 of file reedsolomon.h.
Referenced by decode(), and Reed_Solomon().
|
protected |
Internal encoder/decoder parameters
Definition at line 115 of file reedsolomon.h.
Referenced by decode(), encode(), and Reed_Solomon().
|
protected |
Internal encoder/decoder parameters
Definition at line 115 of file reedsolomon.h.
Referenced by decode(), encode(), and Reed_Solomon().
|
protected |
Internal encoder/decoder parameters
Definition at line 115 of file reedsolomon.h.
Referenced by decode(), encode(), and Reed_Solomon().
|
protected |
Internal encoder/decoder parameters
Definition at line 115 of file reedsolomon.h.
Referenced by decode(), and Reed_Solomon().
Generated on Sat May 25 2013 16:32:32 for IT++ by Doxygen 1.8.2