Class CubicSplineInterpolator
- java.lang.Object
-
- com.opengamma.strata.math.impl.interpolation.PiecewisePolynomialInterpolator
-
- com.opengamma.strata.math.impl.interpolation.CubicSplineInterpolator
-
public class CubicSplineInterpolator extends PiecewisePolynomialInterpolator
C2 cubic spline interpolator with Clamped/Not-A-Knot endpoint conditions.
-
-
Constructor Summary
Constructors Constructor Description CubicSplineInterpolator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PiecewisePolynomialResult
interpolate(double[] xValues, double[] yValues)
If (xValues length) = (yValues length), Not-A-Knot endpoint conditions are used.PiecewisePolynomialResult
interpolate(double[] xValues, double[][] yValuesMatrix)
If (xValues length) = (yValuesMatrix NumberOfColumn), Not-A-Knot endpoint conditions are used.PiecewisePolynomialResultsWithSensitivity
interpolateWithSensitivity(double[] xValues, double[] yValues)
Derive interpolant on {xValues_i, yValues_i} and (yValues) node sensitivity.-
Methods inherited from class com.opengamma.strata.math.impl.interpolation.PiecewisePolynomialInterpolator
getPrimaryMethod, getValue, getValue, interpolate, interpolate, interpolate, interpolate, interpolate, interpolate
-
-
-
-
Method Detail
-
interpolate
public PiecewisePolynomialResult interpolate(double[] xValues, double[] yValues)
If (xValues length) = (yValues length), Not-A-Knot endpoint conditions are used. If (xValues length) + 2 = (yValues length), Clamped endpoint conditions are used.- Specified by:
interpolate
in classPiecewisePolynomialInterpolator
- Parameters:
xValues
- X values of datayValues
- Y values of data- Returns:
PiecewisePolynomialResult
containing knots, coefficients of piecewise polynomials, number of intervals, degree of polynomials, dimension of spline
-
interpolate
public PiecewisePolynomialResult interpolate(double[] xValues, double[][] yValuesMatrix)
If (xValues length) = (yValuesMatrix NumberOfColumn), Not-A-Knot endpoint conditions are used. If (xValues length) + 2 = (yValuesMatrix NumberOfColumn), Clamped endpoint conditions are used.- Specified by:
interpolate
in classPiecewisePolynomialInterpolator
- Parameters:
xValues
- X values of datayValuesMatrix
- Y values of data, where NumberOfRow defines dimension of the spline- Returns:
PiecewisePolynomialResult
containing knots, coefficients of piecewise polynomials, number of intervals, degree of polynomials, dimension of spline
-
interpolateWithSensitivity
public PiecewisePolynomialResultsWithSensitivity interpolateWithSensitivity(double[] xValues, double[] yValues)
Description copied from class:PiecewisePolynomialInterpolator
Derive interpolant on {xValues_i, yValues_i} and (yValues) node sensitivity.- Specified by:
interpolateWithSensitivity
in classPiecewisePolynomialInterpolator
- Parameters:
xValues
- X values of datayValues
- Y values of data- Returns:
PiecewisePolynomialResultsWithSensitivity
-
-