00001 00033 #ifndef BCH_H 00034 #define BCH_H 00035 00036 #include <itpp/comm/galois.h> 00037 #include <itpp/comm/channel_code.h> 00038 00039 00040 namespace itpp { 00041 00046 //---------------------- BCH -------------------------------------- 00047 00062 class BCH : public Channel_Code { 00063 public: 00065 BCH(int in_n, int in_k, int in_t, ivec genpolynom); 00066 00068 virtual ~BCH(){ } 00069 00071 virtual void encode(const bvec &uncoded_bits, bvec &coded_bits); 00073 virtual bvec encode(const bvec &uncoded_bits); 00074 00076 virtual void decode(const bvec &coded_bits, bvec &decoded_bits); 00078 virtual bvec decode(const bvec &coded_bits); 00079 00080 // Soft-decision decoding is not implemented 00081 virtual void decode(const vec &received_signal, bvec &output); 00082 virtual bvec decode(const vec &received_signal); 00083 00085 virtual double get_rate() {return double(k)/double(n); } 00086 00087 //protected: 00088 private: 00089 int n, k, t; 00090 GFX g; 00091 }; 00092 00093 } // namespace itpp 00094 00095 #endif // #ifndef BCH_H
Generated on Fri Jun 8 02:08:54 2007 for IT++ by Doxygen 1.5.2