public class NumberInterpolatingTreeMap
extends java.util.TreeMap<java.lang.Number,java.lang.Number>
LinearInterpolatingDoubleArray
used in modeling an interpolated table. Keys represent Input and Values represent the Output.
Entries added to this data structure are automatically sorted by key value.
LinearInterpolatingDoubleArray
,
Interpolator
,
TreeMap
,
Serialized FormConstructor and Description |
---|
NumberInterpolatingTreeMap() |
Modifier and Type | Method and Description |
---|---|
Interpolator |
getInterpolator()
Retrieve the intepolator used by the class
|
java.lang.Number |
interpolateValue(java.lang.Number key)
Returns the intepolated value of key
|
void |
put(double[] keys,
double[] values)
Insert a array of input and corresponding output to data structure.
|
void |
put(java.lang.Number[] keys,
java.lang.Number[] values)
Insert a array of input and corresponding output to data structure.
|
void |
setInterpolator(Interpolator interpolator)
Set the interpolating scheme used by the class.
|
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, size, subMap, subMap, tailMap, tailMap, values
public java.lang.Number interpolateValue(java.lang.Number key)
key
- is the input to the intepolating functionRuntimeException
if provided key is out of boundspublic void setInterpolator(Interpolator interpolator)
interpolator
- is interpolator used by the classpublic Interpolator getInterpolator()
public void put(java.lang.Number[] keys, java.lang.Number[] values)
keys
- is an array of input values.values
- is corresponding array of output values.public void put(double[] keys, double[] values)
keys
- is an array of input values.values
- is corresponding array of output values.