Discretisizer Class Reference
Use this class to get discrete values.
More...
#include <discretisizer.h>
List of all members.
Detailed Description
Use this class to get discrete values.
If no intervalCount is set, the count=1. If no intervalRange is set, the range is automatically adjusted.
There are three possibilities: 1. automaticRange=true --> mapping is always disabled 2. automaticRange=false, mapToInterval=true --> real (found) range is mapped to specified range 3. automaticRange=false, mapToInterval=false --> no mapping, no range adjustment, values outside the specified range are set to minRange respectively maxRange
Constructor & Destructor Documentation
call this constructor if you don't like to decide which range for the values are used, therefore the range ist found automatically.
Note: The adjustment of the range is enabled, if this method is called.
- Parameters:
-
| numberBins | the number of bins "created" |
Discretisizer |
( |
int |
numberBins, |
|
|
double |
minRange, |
|
|
double |
maxRange, |
|
|
bool |
mapToInterval | |
|
) |
| | |
call this constructor if you like to decide yourself which range for the values are used.
The third parameter decides if the originally range should be completely mapped to the given interval range. If not, the values outside the given interval range are set to minRange respectively maxRange.
Note: The adjustment of the range is disabled, if this method is called.
- Parameters:
-
| numberBins | the number of bins "created" |
| minRange | the minimum of the interval |
| maxRange | the maximum of the interval |
| mapToInterval | decides if all values are mapped to the given |
Member Function Documentation
int discretisizeValue |
( |
double |
valueToDiscretisize |
) |
[protected, virtual] |
is used for discretisizing values
void findMinAndMaxRange |
( |
double |
value |
) |
[protected, virtual] |
is used for automaticRange, sets min and max range.
void findMinAndMaxValues |
( |
double |
value |
) |
[protected, virtual] |
is used for mapToInterval, sets min and max values.
double get |
( |
double |
value |
) |
[virtual] |
returns the given value as an discretisized double.
this method returns returns a value between minRange and maxRange
- Parameters:
-
| value | the value to discretisize |
- Returns:
- discretisized value between minRange and maxRange
int getBinNumber |
( |
double |
value |
) |
[virtual] |
returns the given value as an discretisized integer.
this method returns a value between 0...numberbins-1.
- Parameters:
-
| value | the value to discretisize |
- Returns:
- the bin number
double getMaxRange |
( |
|
) |
[virtual] |
double getMinRange |
( |
|
) |
[virtual] |
int roundValue |
( |
double |
valueToRound |
) |
[protected, virtual] |
Member Data Documentation
The documentation for this class was generated from the following files: