Convert positive floats to quantised ints. More...
#include <Quantise.h>
  
 Public Member Functions | |
| Quantise (int levels, float lower, float upper) | |
| Intialise the class using the number of quantum levels wanted and the float range.  | |
| Quantise (void) | |
| Construct the class and initialise later.  | |
| void | calculateBounds (int levels, float lower, float upper) | 
| Compute the statistics needed for quantisation (if not done during construction).  | |
| virtual int | convertToInt (float value) | 
| Convert a float value to an int.  | |
| virtual float | convertToFloat (int value) | 
| Convert an int value to a float.  | |
| void | buildLookUpTable (void) | 
| Build a lookup table to reduce later int to float computation.  | |
| float | useLookUpTable (int value) | 
| Convert an int to a float using the lookup table.  | |
| float | lowerBound (void) | 
| Return the float lower bound.  | |
| float | upperBound (void) | 
| Return the float upper bound.  | |
| int | levels (void) | 
| Return the number of levels.  | |
Convert positive floats to quantised ints.
This class is used to convert a set of positive floats to ints and the quantised ints to floats using a mapping table computed using the set bounds.
 1.6.1