#include <bch.h>
Collaboration diagram for SPUC::BCH:

Public Member Functions | |
| BCH (int in_n, int in_k, int in_t, ivec genpolynom) | |
| Initialize a (n,k)-code that can correct t errors. | |
| bvec | encode (const bvec &uncodedbits) |
| Encode a bvec of indata. | |
| bvec | decode (const bvec &codedbits) |
| Decode a bvec of coded data. | |
| double | get_rate () |
| Get the code rate. | |
The notation used is found in S. B. Wicker, "Error control systems for digital communication and storage", Appendix E, Prentice-Hall, 1995.
Example:
BCH bch(31,21,2,"3551")
, and is capable of correcting 2 errors with n = 31 and k = 21.
|
||||||||||||||||||||
|
Initialize a (n,k)-code that can correct t errors.
|
|
|
Decode a bvec of coded data.
|
|
|
Encode a bvec of indata.
|
|
|
Get the code rate.
|
1.4.4