IT++ Logo Newcom Logo

reedsolomon.h

Go to the documentation of this file.
00001 
00033 #ifndef REEDSOLOMON_H
00034 #define REEDSOLOMON_H
00035 
00036 #include <itpp/base/vec.h>
00037 #include <itpp/comm/galois.h>
00038 #include <itpp/comm/channel_code.h>
00039 
00040 
00041 namespace itpp {
00042 
00043   //---------------------- Reed-Solomon --------------------------------------
00044 
00054   class Reed_Solomon : public Channel_Code {
00055   public:
00057     Reed_Solomon(int in_m, int in_t);
00059     virtual ~Reed_Solomon(){ }
00060 
00062     virtual void encode(const bvec &uncoded_bits, bvec &coded_bits);
00064     virtual bvec encode(const bvec &uncoded_bits);
00065 
00067     virtual void decode(const bvec &coded_bits, bvec &decoded_bits);
00069     virtual bvec decode(const bvec &coded_bits);
00070 
00071     // Soft-decision decoding is not implemented
00072     virtual void decode(const vec &received_signal, bvec &output);
00073     virtual bvec decode(const vec &received_signal);
00074 
00076     virtual double get_rate() { return double(k)/double(n); }
00077 
00078   protected:
00080     int m, t, k, n, q;
00082     GFX g;
00083   };
00084 
00085 } // namespace itpp
00086 
00087 #endif // #ifndef REEDSOLOMON_H
SourceForge Logo

Generated on Wed Apr 18 11:45:35 2007 for IT++ by Doxygen 1.5.2