#include <hammcode.h>
Public Member Functions | |
Hamming_Code (int m) | |
Constructor for hamming(n,k) . n = pow(2,m)-1 and k = pow(2,m)-m-1. | |
virtual | ~Hamming_Code () |
Destructor. | |
virtual void | encode (const bvec &uncoded_bits, bvec &coded_bits) |
Hamming encoder. Will truncate some bits if not length = integer * k. | |
virtual bvec | encode (const bvec &uncoded_bits) |
Hamming encoder. Will truncate some bits if not length = integer * k. | |
virtual void | decode (const bvec &coded_bits, bvec &decoded_bits) |
Hamming decoder. Will truncate some bits if not length = integer * n. | |
virtual bvec | decode (const bvec &coded_bits) |
Hamming decoder. Will truncate some bits if not length = integer * n. | |
virtual void | decode (const vec &received_signal, bvec &output) |
Decode a vec of received data. | |
virtual bvec | decode (const vec &received_signal) |
Decode a vec of received data. | |
virtual double | get_rate () const |
Get the code rate. | |
int | get_n () const |
Gets the code length n. | |
int | get_k () const |
Gets the number of information bits per code word, k. | |
bmat | get_H () const |
Gets the parity check matrix for the code. | |
bmat | get_G () const |
Gets the generator matrix for the code. |