IT++ Logo
reedsolomon.h
Go to the documentation of this file.
00001 
00029 #ifndef REEDSOLOMON_H
00030 #define REEDSOLOMON_H
00031 
00032 #include <itpp/base/vec.h>
00033 #include <itpp/comm/galois.h>
00034 #include <itpp/comm/channel_code.h>
00035 
00036 
00037 namespace itpp
00038 {
00039 
00040 //---------------------- Reed-Solomon --------------------------------------
00041 
00051 class Reed_Solomon : public Channel_Code
00052 {
00053 public:
00055   Reed_Solomon(int in_m, int in_t, bool sys = false);
00057   virtual ~Reed_Solomon() { }
00058 
00060   virtual void encode(const bvec &uncoded_bits, bvec &coded_bits);
00062   virtual bvec encode(const bvec &uncoded_bits);
00063 
00065   virtual void decode(const bvec &coded_bits, bvec &decoded_bits);
00067   virtual bvec decode(const bvec &coded_bits);
00068 
00069   // Soft-decision decoding is not implemented
00070   virtual void decode(const vec &received_signal, bvec &output);
00071   virtual bvec decode(const vec &received_signal);
00072 
00074   virtual double get_rate() const { return static_cast<double>(k) / n; }
00075 
00077   Reed_Solomon & operator=(const Reed_Solomon &) { return *this; }
00078 
00079 protected:
00082   int m, t, k, n, q;
00084 
00085   GFX g;
00087   const bool systematic;
00088 };
00089 
00090 } // namespace itpp
00091 
00092 #endif // #ifndef REEDSOLOMON_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SourceForge Logo

Generated on Wed Jul 27 2011 16:27:05 for IT++ by Doxygen 1.7.4