IT++ Logo
egolay.h
Go to the documentation of this file.
1 
29 #ifndef EGOLAY_H
30 #define EGOLAY_H
31 
32 #include <itpp/base/vec.h>
33 #include <itpp/base/mat.h>
34 #include <itpp/comm/channel_code.h>
35 #include <itpp/itexports.h>
36 
37 namespace itpp
38 {
39 
51 class ITPP_EXPORT Extended_Golay : public Channel_Code
52 {
53 public:
57  virtual ~Extended_Golay() { }
58 
60  virtual void encode(const bvec &uncoded_bits, bvec &coded_bits);
62  virtual bvec encode(const bvec &uncoded_bits);
63 
65  virtual void decode(const bvec &coded_bits, bvec &decoded_bits);
67  virtual bvec decode(const bvec &coded_bits);
68 
69  // Soft-decision decoding is not implemented
70  virtual void decode(const vec &received_signal, bvec &output);
71  virtual bvec decode(const vec &received_signal);
72 
74  virtual double get_rate() const { return 0.5; };
75 
77  bmat get_G() const { return G; }
78 private:
79  bmat B, G;
80 };
81 
82 } // namespace itpp
83 
84 #endif // #ifndef EGOLAY_H
Channel Code class virtual interface.
Generic Channel Code class.
Definition: channel_code.h:51
Extended Golay code (24,12,8).
Definition: egolay.h:52
bmat get_G() const
Gets the generator matrix for the code (also the parity check matrix)
Definition: egolay.h:77
virtual ~Extended_Golay()
Destructor.
Definition: egolay.h:57
virtual double get_rate() const
Get the code rate.
Definition: egolay.h:74
Matrix Class Definitions.
Mat< bin > bmat
bin matrix
Definition: mat.h:508
itpp namespace
Definition: itmex.h:37
Templated Vector Class Definitions.

Generated on Tue Aug 17 2021 10:59:15 for IT++ by Doxygen 1.9.1