reedsolomon.h
Go to the documentation of this file.
#ifndef REEDSOLOMON_H
#define REEDSOLOMON_H
#include <itpp/base/vec.h>
#include <itpp/comm/galois.h>
#include <itpp/comm/channel_code.h>
#include <itpp/itexports.h>
namespace itpp
{
//---------------------- Reed-Solomon --------------------------------------
class ITPP_EXPORT Reed_Solomon : public Channel_Code
{
public:
Reed_Solomon(int in_m, int in_t, bool sys = false, int in_b = 1);
virtual ~Reed_Solomon() { }
virtual void encode(const bvec &uncoded_bits, bvec &coded_bits);
virtual bvec encode(const bvec &uncoded_bits);
virtual bool decode(const bvec &coded_bits, const ivec &erasure_positions, bvec &decoded_message, bvec &cw_isvalid);
virtual bool decode(const bvec &coded_bits, bvec &decoded_message, bvec &cw_isvalid);
virtual void decode(const bvec &coded_bits, bvec &decoded_bits);
virtual bvec decode(const bvec &coded_bits);
// Soft-decision decoding is not implemented
virtual void decode(const vec &received_signal, bvec &output);
virtual bvec decode(const vec &received_signal);
virtual double get_rate() const { return static_cast<double>(k) / n; }
Reed_Solomon & operator=(const Reed_Solomon &) { return *this; }
protected:
int m, t, k, n, q, b;
GFX g;
const bool systematic;
};
} // namespace itpp
#endif // #ifndef REEDSOLOMON_H
channel_code.h
Channel Code class virtual interface.
itpp::Array
General array class.
Definition array.h:105
itpp::Channel_Code
Generic Channel Code class.
Definition channel_code.h:51
itpp::GFX
Polynomials over GF(q)[x], where q=2^m, m=1,...,16.
Definition galois.h:176
itpp::Reed_Solomon
Reed-Solomon Codes.
Definition reedsolomon.h:52
itpp::Reed_Solomon::b
int b
Definition reedsolomon.h:115
itpp::Reed_Solomon::g
GFX g
The generator polynomial of the RS code.
Definition reedsolomon.h:118
itpp::Reed_Solomon::get_rate
virtual double get_rate() const
Gets the rate of the RS-code.
Definition reedsolomon.h:107
itpp::Reed_Solomon::operator=
Reed_Solomon & operator=(const Reed_Solomon &)
Dummy assignment operator - MSVC++ warning C4512.
Definition reedsolomon.h:110
itpp::Reed_Solomon::~Reed_Solomon
virtual ~Reed_Solomon()
Destructor.
Definition reedsolomon.h:60
itpp::Reed_Solomon::systematic
const bool systematic
Whether or not the code is systematic.
Definition reedsolomon.h:120
galois.h
Definitions of Galois Field algebra classes and functions.
itpp
itpp namespace
Definition itmex.h:37
vec.h
Templated Vector Class Definitions.

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