IT++ Logo
reedsolomon.h
Go to the documentation of this file.
1 
29 #ifndef REEDSOLOMON_H
30 #define REEDSOLOMON_H
31 
32 #include <itpp/base/vec.h>
33 #include <itpp/comm/galois.h>
34 #include <itpp/comm/channel_code.h>
35 #include <itpp/itexports.h>
36 
37 namespace itpp
38 {
39 
40 //---------------------- Reed-Solomon --------------------------------------
41 
51 class ITPP_EXPORT Reed_Solomon : public Channel_Code
52 {
53 public:
58  Reed_Solomon(int in_m, int in_t, bool sys = false, int in_b = 1);
60  virtual ~Reed_Solomon() { }
61 
63  virtual void encode(const bvec &uncoded_bits, bvec &coded_bits);
65  virtual bvec encode(const bvec &uncoded_bits);
66 
82  virtual bool decode(const bvec &coded_bits, const ivec &erasure_positions, bvec &decoded_message, bvec &cw_isvalid);
83 
95  virtual bool decode(const bvec &coded_bits, bvec &decoded_message, bvec &cw_isvalid);
96 
98  virtual void decode(const bvec &coded_bits, bvec &decoded_bits);
100  virtual bvec decode(const bvec &coded_bits);
101 
102  // Soft-decision decoding is not implemented
103  virtual void decode(const vec &received_signal, bvec &output);
104  virtual bvec decode(const vec &received_signal);
105 
107  virtual double get_rate() const { return static_cast<double>(k) / n; }
108 
110  Reed_Solomon & operator=(const Reed_Solomon &) { return *this; }
111 
112 protected:
115  int m, t, k, n, q, b;
117  GFX g;
120  const bool systematic;
121 };
122 
123 } // namespace itpp
124 
125 #endif // #ifndef REEDSOLOMON_H
Definitions of Galois Field algebra classes and functions.
Reed-Solomon Codes.
Definition: reedsolomon.h:51
Reed_Solomon & operator=(const Reed_Solomon &)
Dummy assignment operator - MSVC++ warning C4512.
Definition: reedsolomon.h:110
Generic Channel Code class.
Definition: channel_code.h:50
Channel Code class virtual interface.
itpp namespace
Definition: itmex.h:36
const bool systematic
Whether or not the code is systematic.
Definition: reedsolomon.h:120
Polynomials over GF(q)[x], where q=2^m, m=1,...,16.
Definition: galois.h:175
virtual double get_rate() const
Gets the rate of the RS-code.
Definition: reedsolomon.h:107
virtual ~Reed_Solomon()
Destructor.
Definition: reedsolomon.h:60
Templated Vector Class Definitions.

Generated on Thu Jun 21 2018 16:06:18 for IT++ by Doxygen 1.8.13