#include <hammcode.h>
Public Member Functions | |
| Hamming_Code (short m) | |
Constructor for hamming(n,k). n = pow(2,m)-1 and k = pow(2,m)-m-1. | |
| bvec | encode (const bvec &uncoded_bits) |
Hamming encoder. Will truncate some bits if not length = integer * k. | |
| bvec | decode (const bvec &coded_bits) |
Hamming decoder. Will truncate some bits if not length = integer * n. | |
| short | get_n () |
| Gets the code length n. | |
| short | get_k () |
| Gets the number of information bits per code word, k. | |
| bmat | get_H () |
| Gets the parity check matrix for the code. | |
| bmat | get_G () |
| Gets the generator matrix for the code. | |
|
|
Constructor for
|
|
|
Hamming decoder. Will truncate some bits if not length =
|
|
|
Hamming encoder. Will truncate some bits if not length =
|
|
|
Gets the generator matrix for the code.
|
|
|
Gets the parity check matrix for the code.
|
|
|
Gets the number of information bits per code word, k.
|
|
|
Gets the code length n.
|
1.4.4