public interface BoundCurveInterpolator
A bound interpolator is created from a CurveInterpolator.
The bind process takes the definition of the interpolator and combines it with the x-y values.
This allows implementations to optimize interpolation calculations.
A bound interpolator is typically linked to two extrapolators. 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.
| Modifier and Type | Method and Description |
|---|---|
BoundCurveInterpolator |
bind(BoundCurveExtrapolator extrapolatorLeft,
BoundCurveExtrapolator extrapolatorRight)
Binds this interpolator to the specified extrapolators.
|
double |
firstDerivative(double x)
Computes the first derivative of the y-value for the specified x-value.
|
double |
interpolate(double x)
Computes the y-value for the specified x-value by interpolation.
|
DoubleArray |
parameterSensitivity(double x)
Computes the sensitivity of the y-value with respect to the curve parameters.
|
double interpolate(double x)
x - the x-value to find the y-value forRuntimeException - if the y-value cannot be calculateddouble firstDerivative(double x)
The first derivative is dy/dx.
x - the x-value at which the derivative is takenRuntimeException - if the derivative cannot be calculatedDoubleArray parameterSensitivity(double x)
This returns an array with one element for each parameter of the curve. The array contains the sensitivity of the y-value at the specified x-value to each parameter.
x - the x-value at which the parameter sensitivity is computedRuntimeException - if the sensitivity cannot be calculatedBoundCurveInterpolator bind(BoundCurveExtrapolator extrapolatorLeft, BoundCurveExtrapolator extrapolatorRight)
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.
This method is intended to be called from within
CurveInterpolator.bind(DoubleArray, DoubleArray, CurveExtrapolator, CurveExtrapolator).
extrapolatorLeft - the extrapolator for x-values on the leftextrapolatorRight - the extrapolator for x-values on the rightCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.