Class PiecewiseCubicHermiteSplineInterpolator
- java.lang.Object
-
- com.opengamma.strata.math.impl.interpolation.PiecewisePolynomialInterpolator
-
- com.opengamma.strata.math.impl.interpolation.PiecewiseCubicHermiteSplineInterpolator
-
public class PiecewiseCubicHermiteSplineInterpolator extends PiecewisePolynomialInterpolator
C1 cubic interpolation preserving monotonicity based on Fritsch, F. N.; Carlson, R. E. (1980) "Monotone Piecewise Cubic Interpolation", SIAM Journal on Numerical Analysis 17 (2): 238–246. Fritsch, F. N. and Butland, J. (1984) "A method for constructing local monotone piecewise cubic interpolants", SIAM Journal on Scientific and Statistical Computing 5 (2): 300-304.
-
-
Constructor Summary
Constructors Constructor Description PiecewiseCubicHermiteSplineInterpolator()
-
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- Returns:
- Coefficient matrix whose i-th row vector is {a_n, a_{n-1}, ... } of f(x) = a_n * (x-x_i)^n + a_{n-1} * (x-x_i)^{n-1} +... for the i-th interval
-
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
-
-