public interface BoundCurveInterpolator
A bound interpolator is created from a
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|
Binds this interpolator to the specified extrapolators.
Computes the first derivative of the y-value for the specified x-value.
Computes the y-value for the specified x-value by interpolation.
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 for
RuntimeException- if the y-value cannot be calculated
double firstDerivative(double x)
The first derivative is
x- the x-value at which the derivative is taken
RuntimeException- if the derivative cannot be calculated
DoubleArray 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 computed
RuntimeException- if the sensitivity cannot be calculated
BoundCurveInterpolator 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 left
extrapolatorRight- the extrapolator for x-values on the right
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.