public class InterpolatingDouble extends java.lang.Object implements Interpolable<InterpolatingDouble>, InverseInterpolable<InterpolatingDouble>, java.lang.Comparable<InterpolatingDouble>
InterpolatingTreeMap
Modifier and Type | Field and Description |
---|---|
java.lang.Double |
value |
Constructor and Description |
---|
InterpolatingDouble(java.lang.Double val) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(InterpolatingDouble other) |
InterpolatingDouble |
interpolate(InterpolatingDouble other,
double x)
Interpolates between this value and an other value according to a given
parameter.
|
double |
inverseInterpolate(InterpolatingDouble upper,
InterpolatingDouble query)
Given this point (lower), a query point (query), and an upper point
(upper), estimate how far (on [0, 1]) between 'lower' and 'upper' the
query point lies.
|
public InterpolatingDouble interpolate(InterpolatingDouble other, double x)
Interpolable
interpolate
in interface Interpolable<InterpolatingDouble>
other
- The value of the upper boundx
- The requested value. Should be between 0 and 1.public double inverseInterpolate(InterpolatingDouble upper, InterpolatingDouble query)
InverseInterpolable
inverseInterpolate
in interface InverseInterpolable<InterpolatingDouble>
public int compareTo(InterpolatingDouble other)
compareTo
in interface java.lang.Comparable<InterpolatingDouble>