00001
00029 #ifndef EGOLAY_H
00030 #define EGOLAY_H
00031
00032 #include <itpp/base/vec.h>
00033 #include <itpp/base/mat.h>
00034 #include <itpp/comm/channel_code.h>
00035
00036
00037 namespace itpp
00038 {
00039
00051 class Extended_Golay : public Channel_Code
00052 {
00053 public:
00055 Extended_Golay();
00057 virtual ~Extended_Golay() { }
00058
00060 virtual void encode(const bvec &uncoded_bits, bvec &coded_bits);
00062 virtual bvec encode(const bvec &uncoded_bits);
00063
00065 virtual void decode(const bvec &coded_bits, bvec &decoded_bits);
00067 virtual bvec decode(const bvec &coded_bits);
00068
00069
00070 virtual void decode(const vec &received_signal, bvec &output);
00071 virtual bvec decode(const vec &received_signal);
00072
00074 virtual double get_rate() const { return 0.5; };
00075
00077 bmat get_G() const { return G; }
00078 private:
00079 bmat B, G;
00080 };
00081
00082 }
00083
00084 #endif // #ifndef EGOLAY_H