IT++ Logo

reedsolomon.h

Go to the documentation of this file.
00001 
00030 #ifndef REEDSOLOMON_H
00031 #define REEDSOLOMON_H
00032 
00033 #include <itpp/base/vec.h>
00034 #include <itpp/comm/galois.h>
00035 #include <itpp/comm/channel_code.h>
00036 
00037 
00038 namespace itpp
00039 {
00040 
00041 //---------------------- Reed-Solomon --------------------------------------
00042 
00052 class Reed_Solomon : public Channel_Code
00053 {
00054 public:
00056   Reed_Solomon(int in_m, int in_t, bool sys = false);
00058   virtual ~Reed_Solomon() { }
00059 
00061   virtual void encode(const bvec &uncoded_bits, bvec &coded_bits);
00063   virtual bvec encode(const bvec &uncoded_bits);
00064 
00066   virtual void decode(const bvec &coded_bits, bvec &decoded_bits);
00068   virtual bvec decode(const bvec &coded_bits);
00069 
00070   // Soft-decision decoding is not implemented
00071   virtual void decode(const vec &received_signal, bvec &output);
00072   virtual bvec decode(const vec &received_signal);
00073 
00075   virtual double get_rate() const { return static_cast<double>(k) / n; }
00076 
00078   Reed_Solomon & operator=(const Reed_Solomon &) { return *this; }
00079 
00080 protected:
00083   int m, t, k, n, q;
00085 
00086   GFX g;
00088   const bool systematic;
00089 };
00090 
00091 } // namespace itpp
00092 
00093 #endif // #ifndef REEDSOLOMON_H
SourceForge Logo

Generated on Sun Jul 26 08:36:49 2009 for IT++ by Doxygen 1.5.9