Package tagalong.math
Class LinearizedLookupTable
java.lang.Object
tagalong.math.LinearizedLookupTable
Linearized Lookup Table
-
Constructor Summary
ConstructorsConstructorDescriptionLinearizedLookupTable
(double[] id, double[] values) Constructs a lookup table containing IDs and their corresponding values -
Method Summary
-
Constructor Details
-
LinearizedLookupTable
Constructs a lookup table containing IDs and their corresponding values- Parameters:
id
- array of identifiersvalues
- array of values corresponding to the IDs
-
-
Method Details
-
lookup
Returns the value that the ID maps to on a continuous, linearized function- Parameters:
id
- ID contained in the lookup table- Returns:
- value using linearized lookup
-
size
Gets length of ID array- Returns:
- length of ID array
-