## Class PiecewisePolynomialResult2D

• java.lang.Object
• com.opengamma.strata.math.impl.interpolation.PiecewisePolynomialResult2D

• public class PiecewisePolynomialResult2D
extends Object
Result of 2D interpolation.

Result by piecewise polynomial f(x0,x1) containing _knots0: Positions of knots in x0 direction _knots1: Positions of knots in x1 direction _coefMatrix: Coefficient matrix whose (i,j) element is a DoubleMatrix containing coefficients for the square, _knots0_i < x0 < _knots0_{i+1}, _knots1_j < x1 < _knots1_{j+1}, Each DoubleMatrix is c_ij where f(x0,x1) = sum_{i=0}^{order0-1} sum_{j=0}^{order1-1} coefMat_{ij} (x0-knots0_i)^{order0-1-i} (x1-knots1_j)^{order0-1-j} _nIntervals: Number of intervals in x0 direction and x1 direction, respectively, which should be (Number of knots) - 1 _order: Number of coefficients in polynomial in terms of x0 and x1, respectively, which is equal to (polynomial degree) + 1

• ### Constructor Summary

Constructors
Constructor Description
PiecewisePolynomialResult2D​(DoubleArray knots0, DoubleArray knots1, DoubleMatrix[][] coefMatrix, int[] order)
Creates an instance.
• ### Method Summary

All Methods
Modifier and Type Method Description
DoubleMatrix[][] getCoefs()
Access _coefMatrix.
DoubleArray getKnots0()
Access _knots0.
DoubleArray getKnots1()
Access _knots1.
ArrayList<DoubleArray> getKnots2D()
Access _knots0 and _knots1.
int[] getNumberOfIntervals()
Access _nIntervals.
int[] getOrder()
Access _order.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### PiecewisePolynomialResult2D

public PiecewisePolynomialResult2D​(DoubleArray knots0,
DoubleArray knots1,
DoubleMatrix[][] coefMatrix,
int[] order)
Creates an instance.
Parameters:
knots0 - The knots in the x0 direction
knots1 - The knots in the x1 direction
coefMatrix - The coefficient matrix
order - The order of the polynomial
• ### Method Detail

• #### getKnots2D

public ArrayList<DoubleArray> getKnots2D()
Access _knots0 and _knots1.
Returns:
_knots0 and _knots1 contained in a ArrayList
• #### getKnots0

public DoubleArray getKnots0()
Access _knots0.
Returns:
_knots0
• #### getKnots1

public DoubleArray getKnots1()
Access _knots1.
Returns:
knots1
• #### getCoefs

public DoubleMatrix[][] getCoefs()
Access _coefMatrix.
Returns:
_coefMatrix
• #### getNumberOfIntervals

public int[] getNumberOfIntervals()
Access _nIntervals.
Returns:
_nIntervals
• #### getOrder

public int[] getOrder()
Access _order.
Returns:
_order