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 PiecewisePolynomialResultinterpolate(double[] xValues, double[] yValues)Interpolate.PiecewisePolynomialResultinterpolate(double[] xValues, double[][] yValuesMatrix)Interpolate.PiecewisePolynomialResultsWithSensitivityinterpolateWithSensitivity(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:PiecewisePolynomialInterpolatorInterpolate.- Specified by:
interpolatein classPiecewisePolynomialInterpolator- Parameters:
xValues- X values of datayValues- Y values of data- Returns:
PiecewisePolynomialResultcontaining 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:PiecewisePolynomialInterpolatorInterpolate.- Specified by:
interpolatein classPiecewisePolynomialInterpolator- Parameters:
xValues- X values of datayValuesMatrix- Y values of data, where NumberOfRow defines dimension of the spline- Returns:
PiecewisePolynomialResultcontaining 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:PiecewisePolynomialInterpolatorDerive interpolant on {xValues_i, yValues_i} and (yValues) node sensitivity.- Specified by:
interpolateWithSensitivityin classPiecewisePolynomialInterpolator- Parameters:
xValues- X values of datayValues- Y values of data- Returns:
PiecewisePolynomialResultsWithSensitivity
-
-