IT++ Logo

bch.h

Go to the documentation of this file.
00001 
00030 #ifndef BCH_H
00031 #define BCH_H
00032 
00033 #include <itpp/comm/galois.h>
00034 #include <itpp/comm/channel_code.h>
00035 
00036 
00037 namespace itpp {
00038 
00043   //---------------------- BCH --------------------------------------
00044 
00059   class BCH : public Channel_Code {
00060   public:
00062     BCH(int in_n, int in_k, int in_t, ivec genpolynom, bool sys = false);
00063 
00065     virtual ~BCH(){ }
00066 
00068     virtual void encode(const bvec &uncoded_bits, bvec &coded_bits);
00070     virtual bvec encode(const bvec &uncoded_bits);
00071 
00073     virtual void decode(const bvec &coded_bits, bvec &decoded_bits);
00075     virtual bvec decode(const bvec &coded_bits);
00076 
00077     // Soft-decision decoding is not implemented
00078     virtual void decode(const vec &received_signal, bvec &output);
00079     virtual bvec decode(const vec &received_signal);
00080 
00082     virtual double get_rate() const {return static_cast<double>(k) / n; }
00083 
00084     //protected:
00085   private:
00086     int n, k, t;
00087     GFX g;
00088     const bool systematic;
00089   };
00090 
00091 } // namespace itpp
00092 
00093 #endif // #ifndef BCH_H
SourceForge Logo

Generated on Sun Apr 20 12:40:06 2008 for IT++ by Doxygen 1.5.5