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 
120  const bool systematic;
121 };
122 
123 } // namespace itpp
124 
125 #endif // #ifndef REEDSOLOMON_H
SourceForge Logo

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