Interface CurveInterpolator
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description BoundCurveInterpolator
bind(DoubleArray xValues, DoubleArray yValues)
Binds this interpolator to a curve where no extrapolation is permitted.default BoundCurveInterpolator
bind(DoubleArray xValues, DoubleArray yValues, CurveExtrapolator extrapolatorLeft, CurveExtrapolator extrapolatorRight)
Binds this interpolator to a curve specifying the extrapolators to use.static ExtendedEnum<CurveInterpolator>
extendedEnum()
Gets the extended enum helper.String
getName()
Gets the name that uniquely identifies this interpolator.static CurveInterpolator
of(String uniqueName)
Obtains an instance from the specified unique name.
-
-
-
Method Detail
-
of
static CurveInterpolator of(String uniqueName)
Obtains an instance from the specified unique name.- Parameters:
uniqueName
- the unique name- Returns:
- the index
- Throws:
IllegalArgumentException
- if the name is not known
-
extendedEnum
static ExtendedEnum<CurveInterpolator> extendedEnum()
Gets the extended enum helper.This helper allows instances of the interpolator to be looked up. It also provides the complete set of available instances.
- Returns:
- the extended enum helper
-
bind
BoundCurveInterpolator bind(DoubleArray xValues, DoubleArray yValues)
Binds this interpolator to a curve where no extrapolation is permitted.The bound interpolator provides methods to interpolate the y-value for a x-value. If an attempt is made to interpolate an x-value outside the range defined by the first and last nodes, an exception will be thrown.
The bind process takes the definition of the interpolator and combines it with the x-y values. This allows implementations to optimize interpolation calculations.
- Parameters:
xValues
- the x-values of the curve, must be sorted from low to highyValues
- the y-values of the curve- Returns:
- the bound interpolator
-
bind
default BoundCurveInterpolator bind(DoubleArray xValues, DoubleArray yValues, CurveExtrapolator extrapolatorLeft, CurveExtrapolator extrapolatorRight)
Binds this interpolator to a curve specifying the extrapolators to use.The bound interpolator provides methods to interpolate the y-value for a x-value. If an attempt is made to interpolate an x-value outside the range defined by the first and last nodes, the appropriate extrapolator will be used.
The bind process takes the definition of the interpolator and combines it with the x-y values. This allows implementations to optimize interpolation calculations.
- Parameters:
xValues
- the x-values of the curve, must be sorted from low to highyValues
- the y-values of the curveextrapolatorLeft
- the extrapolator for x-values on the leftextrapolatorRight
- the extrapolator for x-values on the right- Returns:
- the bound interpolator
-
getName
String getName()
Gets the name that uniquely identifies this interpolator.This name is used in serialization and can be parsed using
of(String)
.
-
-