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 Details

  • Method Details

    • put

      public void put​(K key, V value)
      Inserts a key-value pair.
      Parameters:
      key - The key.
      value - The value.
    • get

      public Double get​(K key)
      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

      public void clear()
      Clears the contents.