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 {
00039 
00044 //---------------------- BCH --------------------------------------
00045 
00060 class BCH : public Channel_Code
00061 {
00062 public:
00064   BCH(int in_n, int in_k, int in_t, ivec genpolynom, bool sys = false);
00065 
00067   virtual ~BCH() { }
00068 
00070   virtual void encode(const bvec &uncoded_bits, bvec &coded_bits);
00072   virtual bvec encode(const bvec &uncoded_bits);
00073 
00075   virtual void decode(const bvec &coded_bits, bvec &decoded_bits);
00077   virtual bvec decode(const bvec &coded_bits);
00078 
00079   // Soft-decision decoding is not implemented
00080   virtual void decode(const vec &received_signal, bvec &output);
00081   virtual bvec decode(const vec &received_signal);
00082 
00084   virtual double get_rate() const {return static_cast<double>(k) / n; }
00085 
00087   BCH & operator=(const BCH &) { return *this; }
00088 private:
00089   int n, k, t;
00090   GFX g;
00091   const bool systematic;
00092 };
00093 
00094 } // namespace itpp
00095 
00096 #endif // #ifndef BCH_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SourceForge Logo

Generated on Wed Jan 20 23:03:04 2010 for IT++ by Doxygen 1.6.2