35 AutoMap(
int min_expected,
int max_expected,
int map_to_min,
int map_to_max)
36 : inherited
(min_expected
,max_expected
),map_min(map_to_min), map_max(map_to_max)
50 return map(n,inherited::getMin(),inherited::getMax(),map_min,map_max);
int next(int n)
Process the next value and return it mapped to the range which was set in the constructor.
int operator()(int n)
Process the next value and return it mapped to the range which was set in the constructor.
Automatically map an input value to an output range without knowing the precise range of inputs befor...
Keeps a running calculation of the range of the input values it receives.
AutoMap(int min_expected, int max_expected, int map_to_min, int map_to_max)
Constructor.
void next(T n)
Updates the current range.
AutoRange(T min_expected, T max_expected)
Constructor.