35#include <itpp/itexports.h>
54 virtual void encode(
const bvec &uncoded_bits, bvec &coded_bits);
56 virtual bvec encode(
const bvec &uncoded_bits);
59 virtual void decode(
const bvec &coded_bits, bvec &decoded_bits);
61 virtual bvec decode(
const bvec &coded_bits);
64 virtual void decode(
const vec &received_signal, bvec &output);
65 virtual bvec decode(
const vec &received_signal);
68 virtual double get_rate()
const {
return static_cast<double>(k) / n; };
71 int get_n()
const {
return n; };
73 int get_k()
const {
return k; };
81 void generate_H(
void);
82 void generate_G(
void);
Channel Code class virtual interface.
Channel_Code()
Default constructor.
bmat get_H() const
Gets the parity check matrix for the code.
virtual double get_rate() const
Get the code rate.
bmat get_G() const
Gets the generator matrix for the code.
virtual ~Hamming_Code()
Destructor.
int get_n() const
Gets the code length n.
Hamming_Code(int m)
Constructor for hamming(n,k). n = pow(2,m)-1 and k = pow(2,m)-m-1.
int get_k() const
Gets the number of information bits per code word, k.
Matrix Class Definitions.
Mat< bin > bmat
bin matrix
Templated Vector Class Definitions.