An extended Bitset ( BitsetExt ) for handling e.g. Hamming encoding/decoding. More...
#include <Bitset.h>
Public Member Functions | |
BitsetExt () | |
Constructor. | |
BitsetExt (bool _verbose) | |
Constructor. | |
int | hamming_dec (int block_len) |
Hamming decoding 'in-place' using the defined block length. | |
void | hamming_enc (int block_len) |
Hamming encoding 'in-place' using the defined block length. | |
void | SetVerbose (bool _verbose) |
Set the verbose/silent mode. | |
Static Public Member Functions | |
static int | count_hamming_dec_len (int block_len, int enc_len) |
Count how many bits will be in the Bitset after hamming decoding. | |
static int | count_hamming_enc_len (int block_len, int dec_len) |
Count how many bits will be in the Bitset after hamming encoding. | |
Protected Member Functions | |
int | hamming_dec_block (unsigned long block_len, std::deque< bool >::iterator &iter) |
void | hamming_enc_block (unsigned long block_len, std::deque< bool >::iterator &iter) |
Protected Attributes | |
bool | verbose |
An extended Bitset ( BitsetExt ) for handling e.g. Hamming encoding/decoding.
This class is based on the basic Bitset. It provides additional features for Hamming coding (See http://en.wikipedia.org/wiki/Hamming_code).
The BitsetExt is used e.g by MarkerData
Constructor.
Definition at line 254 of file Bitset.cpp.
alvar::BitsetExt::BitsetExt | ( | bool | _verbose | ) |
Constructor.
Definition at line 257 of file Bitset.cpp.
int alvar::BitsetExt::count_hamming_dec_len | ( | int | block_len, |
int | enc_len | ||
) | [static] |
Count how many bits will be in the Bitset after hamming decoding.
Definition at line 295 of file Bitset.cpp.
int alvar::BitsetExt::count_hamming_enc_len | ( | int | block_len, |
int | dec_len | ||
) | [static] |
Count how many bits will be in the Bitset after hamming encoding.
Definition at line 278 of file Bitset.cpp.
int alvar::BitsetExt::hamming_dec | ( | int | block_len | ) |
Hamming decoding 'in-place' using the defined block length.
Definition at line 319 of file Bitset.cpp.
int alvar::BitsetExt::hamming_dec_block | ( | unsigned long | block_len, |
std::deque< bool >::iterator & | iter | ||
) | [protected] |
Definition at line 188 of file Bitset.cpp.
void alvar::BitsetExt::hamming_enc | ( | int | block_len | ) |
Hamming encoding 'in-place' using the defined block length.
Definition at line 312 of file Bitset.cpp.
void alvar::BitsetExt::hamming_enc_block | ( | unsigned long | block_len, |
std::deque< bool >::iterator & | iter | ||
) | [protected] |
Definition at line 142 of file Bitset.cpp.
void alvar::BitsetExt::SetVerbose | ( | bool | _verbose | ) |
Set the verbose/silent mode.
Definition at line 275 of file Bitset.cpp.
bool alvar::BitsetExt::verbose [protected] |