IT++ Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
36 
37 namespace itpp
38 {
39 
40 //---------------------- Reed-Solomon --------------------------------------
41 
51 class Reed_Solomon : public Channel_Code
52 {
53 public:
55  Reed_Solomon(int in_m, int in_t, bool sys = false);
57  virtual ~Reed_Solomon() { }
58 
60  virtual void encode(const bvec &uncoded_bits, bvec &coded_bits);
62  virtual bvec encode(const bvec &uncoded_bits);
63 
65  virtual void decode(const bvec &coded_bits, bvec &decoded_bits);
67  virtual bvec decode(const bvec &coded_bits);
68 
69  // Soft-decision decoding is not implemented
70  virtual void decode(const vec &received_signal, bvec &output);
71  virtual bvec decode(const vec &received_signal);
72 
74  virtual double get_rate() const { return static_cast<double>(k) / n; }
75 
77  Reed_Solomon & operator=(const Reed_Solomon &) { return *this; }
78 
79 protected:
82  int m, t, k, n, q;
84 
85  GFX g;
87  const bool systematic;
88 };
89 
90 } // namespace itpp
91 
92 #endif // #ifndef REEDSOLOMON_H
SourceForge Logo

Generated on Fri Mar 21 2014 17:14:13 for IT++ by Doxygen 1.8.1.2