Class PiecewisePolynomialInterpolator2D
- java.lang.Object
-
- com.opengamma.strata.math.impl.interpolation.PiecewisePolynomialInterpolator2D
-
- Direct Known Subclasses:
BicubicSplineInterpolator
public abstract class PiecewisePolynomialInterpolator2D extends Object
Abstract class for interpolations based on 2d piecewise polynomial functions .
-
-
Constructor Summary
Constructors Constructor Description PiecewisePolynomialInterpolator2D()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected double
getValue(DoubleMatrix coefMat, double x0, double x1, double leftKnot0, double leftKnot1)
abstract 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}.DoubleMatrix
interpolate(double[] x0Values, double[] x1Values, double[][] yValues, double[] x0Keys, double[] x1Keys)
double
interpolate(double[] x0Values, double[] x1Values, double[][] yValues, double x0Key, double x1Key)
-
-
-
Method Detail
-
interpolate
public abstract 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}.- 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
-
interpolate
public DoubleMatrix interpolate(double[] x0Values, double[] x1Values, double[][] yValues, double[] x0Keys, double[] x1Keys)
- Parameters:
x0Values
- the valuesx1Values
- the valuesyValues
- the valuesx0Keys
- the keysx1Keys
- the keys- Returns:
- Values of 2D interpolant at (x0Key_i, x1Keys_j)
-
interpolate
public double interpolate(double[] x0Values, double[] x1Values, double[][] yValues, double x0Key, double x1Key)
- Parameters:
x0Values
- the valuesx1Values
- the valuesyValues
- the valuesx0Key
- the keyx1Key
- the key- Returns:
- Value of 2D interpolant at (x0Key, x1Key)
-
getValue
protected double getValue(DoubleMatrix coefMat, double x0, double x1, double leftKnot0, double leftKnot1)
- Parameters:
coefMat
- the coefMatx0
- the x0x1
- the x1leftKnot0
- the leftKnot0leftKnot1
- the leftKnot1- Returns:
- sum_{i=0}^{order0-1} sum_{j=0}^{order1-1} coefMat_{ij} (x0-leftKnots0)^{order0-1-i} (x1-leftKnots1)^{order0-1-j}
-
-