Class NaturalSplineInterpolator
- java.lang.Object
-
- com.opengamma.strata.math.impl.interpolation.PiecewisePolynomialInterpolator
-
- com.opengamma.strata.math.impl.interpolation.NaturalSplineInterpolator
-
- Direct Known Subclasses:
LogNaturalSplineHelper
public class NaturalSplineInterpolator extends PiecewisePolynomialInterpolator
Natural cubic spline interpolation.C2 cubic spline interpolator with the natural endpoint condition, i.e., the second derivative values are zero at the first data point and the last data point.
-
-
Constructor Summary
Constructors Constructor Description NaturalSplineInterpolator()
Constructor.NaturalSplineInterpolator(com.opengamma.strata.math.impl.interpolation.CubicSplineSolver inherit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PiecewisePolynomialResult
interpolate(double[] xValues, double[] yValues)
Interpolate.PiecewisePolynomialResult
interpolate(double[] xValues, double[][] yValuesMatrix)
Interpolate.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)
Description copied from class:PiecewisePolynomialInterpolator
Interpolate.- 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)
Description copied from class:PiecewisePolynomialInterpolator
Interpolate.- 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
-
-