Class BicubicSplineInterpolator
- java.lang.Object
-
- com.opengamma.strata.math.impl.interpolation.PiecewisePolynomialInterpolator2D
-
- com.opengamma.strata.math.impl.interpolation.BicubicSplineInterpolator
-
public class BicubicSplineInterpolator extends PiecewisePolynomialInterpolator2D
Given a set of data (x0Values_i, x1Values_j, yValues_{ij}), derive the piecewise bicubic function, f(x0,x1) = sum_{i=0}^{3} sum_{j=0}^{3} coefMat_{ij} (x0-x0Values_i)^{3-i} (x1-x1Values_j)^{3-j}, for the region x0Values_i < x0 < x0Values_{i+1}, x1Values_j < x1 < x1Values_{j+1} such that f(x0Values_a, x1Values_b) = yValues_{ab} where a={i,i+1}, b={j,j+1}. 1D piecewise polynomial interpolation methods are called to determine first derivatives and cross derivative at data points Note that the value of the cross derivative at {ij} is not "accurate" if yValues_{ij} = 0.
-
-
Constructor Summary
Constructors Constructor Description BicubicSplineInterpolator(PiecewisePolynomialInterpolator method)
Constructor using the same interpolation method for x0 and x1.BicubicSplineInterpolator(PiecewisePolynomialInterpolator[] method)
Constructor which can take different methods for x0 and x1.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PiecewisePolynomialResult2D
interpolate(double[] x0Values, double[] x1Values, double[][] yValues)
Given a set of data points (x0Values_i, x1Values_j, yValues_{ij}), 2d spline interpolation is returned such that f(x0Values_i, x1Values_j) = yValues_{ij}.-
Methods inherited from class com.opengamma.strata.math.impl.interpolation.PiecewisePolynomialInterpolator2D
getValue, interpolate, interpolate
-
-
-
-
Constructor Detail
-
BicubicSplineInterpolator
public BicubicSplineInterpolator(PiecewisePolynomialInterpolator[] method)
Constructor which can take different methods for x0 and x1.- Parameters:
method
- Choose 2 ofPiecewisePolynomialInterpolator
-
BicubicSplineInterpolator
public BicubicSplineInterpolator(PiecewisePolynomialInterpolator method)
Constructor using the same interpolation method for x0 and x1.- Parameters:
method
-PiecewisePolynomialInterpolator
-
-
Method Detail
-
interpolate
public PiecewisePolynomialResult2D interpolate(double[] x0Values, double[] x1Values, double[][] yValues)
Description copied from class:PiecewisePolynomialInterpolator2D
Given a set of data points (x0Values_i, x1Values_j, yValues_{ij}), 2d spline interpolation is returned such that f(x0Values_i, x1Values_j) = yValues_{ij}.- Specified by:
interpolate
in classPiecewisePolynomialInterpolator2D
- Parameters:
x0Values
- the valuesx1Values
- the valuesyValues
- the values- Returns:
PiecewisePolynomialResult2D
containing positions of knots in x0 direction, positions of knots in x1 direction, coefficients of interpolant, number of intervals in x0 direction, number of intervals in x1 direction, order of polynomial function
-
-