IT++ Logo
Public Member Functions | Protected Attributes | List of all members
itpp::Reed_Solomon Class Reference

Reed-Solomon Codes. More...

#include <itpp/comm/reedsolomon.h>

Inheritance diagram for itpp::Reed_Solomon:
itpp::Channel_Code

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_Solomonoperator= (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
 

Detailed Description

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 $2^m$ - ary of length $2^m-1$ capable of correcting $t$ errors.

Definition at line 51 of file reedsolomon.h.

Constructor & Destructor Documentation

itpp::Reed_Solomon::Reed_Solomon ( int  in_m,
int  in_t,
bool  sys = false,
int  in_b = 1 
)

Class constructor for the $2^m$ - ary, $t$ 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.

Member Function Documentation

bool itpp::Reed_Solomon::decode ( const bvec &  coded_bits,
const ivec &  erasure_positions,
bvec &  decoded_message,
bvec &  cw_isvalid 
)
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().

bool itpp::Reed_Solomon::decode ( const bvec &  coded_bits,
bvec &  decoded_message,
bvec &  cw_isvalid 
)
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().

void itpp::Reed_Solomon::decode ( const bvec &  coded_bits,
bvec &  decoded_bits 
)
virtual

Decoder a bvec of coded data. This function is kept for backward compatibility. Better use.

bool decode(const bvec &coded_bits, bvec &decoded_message, bvec &cw_isvalid)

.

Implements itpp::Channel_Code.

Definition at line 284 of file reedsolomon.cpp.

References decode(), k, m, and itpp::zeros_b().

bvec itpp::Reed_Solomon::decode ( const bvec &  coded_bits)
virtual

Decoder a bvec of coded data. This function is kept for backward compatibility. Better use.

bool decode(const bvec &coded_bits, bvec &decoded_message, bvec &cw_isvalid)

.

Implements itpp::Channel_Code.

Definition at line 297 of file reedsolomon.cpp.

References decode().

Member Data Documentation

int itpp::Reed_Solomon::m
protected

Internal encoder/decoder parameters

Definition at line 115 of file reedsolomon.h.

Referenced by decode(), encode(), and Reed_Solomon().

int itpp::Reed_Solomon::t
protected

Internal encoder/decoder parameters

Definition at line 115 of file reedsolomon.h.

Referenced by decode(), and Reed_Solomon().

int itpp::Reed_Solomon::k
protected

Internal encoder/decoder parameters

Definition at line 115 of file reedsolomon.h.

Referenced by decode(), encode(), and Reed_Solomon().

int itpp::Reed_Solomon::n
protected

Internal encoder/decoder parameters

Definition at line 115 of file reedsolomon.h.

Referenced by decode(), encode(), and Reed_Solomon().

int itpp::Reed_Solomon::q
protected

Internal encoder/decoder parameters

Definition at line 115 of file reedsolomon.h.

Referenced by decode(), encode(), and Reed_Solomon().

int itpp::Reed_Solomon::b
protected

Internal encoder/decoder parameters

Definition at line 115 of file reedsolomon.h.

Referenced by decode(), and Reed_Solomon().


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

Generated on Sat Jul 6 2013 10:54:33 for IT++ by Doxygen 1.8.2