#include <bitmapping.h>
Inheritance diagram for simthlib::MappingScheme:
Public Member Functions | |
MappingScheme (int bitsPerState) | |
virtual | ~MappingScheme () |
bool | getBit (int symbIndex, int bitPos) const |
int | getDataValue (int symbolIndex) const |
int | getSymbolIndex (int integerValue) const |
virtual void | print (std::ostream &os, bool detailedPrint=false) const |
Static Public Member Functions | |
Factory functions. | |
static std::auto_ptr< simthlib::MappingScheme > | newMapping (int bitsPerSymbolPar, map_type mappMode) |
static std::auto_ptr< simthlib::MappingScheme > | new2DimMapping (int numBits1, int numBits2, map_type mappMode) |
static std::auto_ptr< simthlib::MappingScheme > | newApskMapping (int bitsPerState, map_type mappMode) |
static std::auto_ptr< simthlib::MappingScheme > | newQamMapping (int bitsPerState, map_type mappMode) |
Protected Attributes | |
const int | bitsPerSymbol |
const int | modulationValency |
simth::boolVector2d | bitArray |
int | mappedIndex [simth::MAX_STATES_PER_SYMBOL] |
int | mappedInteger [simth::MAX_STATES_PER_SYMBOL] |
The class MappingScheme performs the mapping of a definite number of bits to a corresponding symbol index due to a chosen mapping mode (e.g. gray mapping). The number of bits per symbol is set by an argument of the class constructor.
|
Class constructor.
|
|
|
|
Due to the particular map type, the given symbol index is mapped to the matching integer value which bit at the given bit position is returned. (e.g. (symbol index) 3 -> 5 (integer value) --> (bits) 101 -(position=0)-> return 1) (FIXME: Well, this sounds really strange ... "depending on" and "whose" instead ?) |
|
Returns the data (integer) value corresponding to the given symbol index (e.g. 3 (arbitrary symbol index) --> 5 (integer value)) |
|
Returns the index of a symbol represented by its integer value (e.g. (bits) 101 -> 5 (integer value) --> 3 (arbitrary symbol index)) |
|
|
|
|
|
|
|
|
|
Reimplemented in simthlib::NaturalMapping, simthlib::GrayMapping, and simthlib::GrayMapping2Dimension. |
|
|
|
|
|
|
|
|
|
|