Package edu.wpi.first.util
Class InterpolatingTreeMap<K extends Number,V extends Number>
java.lang.Object
edu.wpi.first.util.InterpolatingTreeMap<K,V>
public class InterpolatingTreeMap<K extends Number,V extends Number> extends Object
Interpolating Tree Maps are used to get values at points that are not defined by making a guess
from points that are defined. This uses linear interpolation.
-
Constructor Summary
Constructors Constructor Description InterpolatingTreeMap()
-
Method Summary
-
Constructor Details
-
InterpolatingTreeMap
public InterpolatingTreeMap()
-
-
Method Details
-
put
Inserts a key-value pair.- Parameters:
key
- The key.value
- The value.
-
get
Returns the value associated with a given key.If there's no matching key, the value returned will be a linear interpolation between the keys before and after the provided one.
- Parameters:
key
- The key.- Returns:
- The value associated with the given key.
-
clear
Clears the contents.
-