java.lang.Object
omix.util.math.ScalingDataMap
public class ScalingDataMap extends Object
This class allows to scale a set of real numbers into a certain range.
The single values are identifiable by a textual identifier and an index.
- Author:
- Dr. Peter Droste, Omix Visualization
-
Constructor Summary
Constructors Constructor Description ScalingDataMap(double rangeMin, double rangeMax)
Giving the range (in min and max value) of the resulting data. -
Method Summary
-
Constructor Details
-
ScalingDataMap
public ScalingDataMap(double rangeMin, double rangeMax)Giving the range (in min and max value) of the resulting data. All values put into the map are scaled between the minimum and maximum value.- Parameters:
rangeMin
- minimum valuerangeMax
- maximum value
-
-
Method Details
-
put
Put a value into the map identified by a textual key and an index. One key/index combination must not be used twice otherwise, the method returns without changes.- Parameters:
key
- textual identifier of the value.index
- index of the value.value
- the real number data.
-
get
Reads a data from the map identifiable by the given key and index.- Parameters:
key
- textual identifier of the value.index
- index of the value.- Returns:
- scaled value or NaN if key does not exist in the map.
-