Class PiecewisePolynomialResult
- java.lang.Object
-
- com.opengamma.strata.math.impl.interpolation.PiecewisePolynomialResult
-
- Direct Known Subclasses:
PiecewisePolynomialResultsWithSensitivity
public class PiecewisePolynomialResult extends Object
Result of interpolation by piecewise polynomial containing _knots: Positions of knots _coefMatrix: Coefficient matrix whose i-th row vector is { a_n, a_{n-1}, ...} for the i-th interval, where a_n, a_{n-1},... are coefficients of f(x) = a_n (x-x_i)^n + a_{n-1} (x-x_i)^{n-1} + .... In multidimensional cases, coefficients for the i-th interval of the j-th spline is in (j*(i-1) + i) -th row vector. _nIntervals: Number of intervals, which should be (Number of knots) - 1 _order: Number of coefficients in polynomial, which is equal to (polynomial degree) + 1 _dim: Number of splines
-
-
Constructor Summary
Constructors Constructor Description PiecewisePolynomialResult(DoubleArray knots, DoubleMatrix coefMatrix, int order, int dim)Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)DoubleMatrixgetCoefMatrix()Access _coefMatrix.intgetDimensions()Access _dim.DoubleArraygetKnots()Access _knots.intgetNumberOfIntervals()Access _nIntervals.intgetOrder()Access _order.inthashCode()
-
-
-
Constructor Detail
-
PiecewisePolynomialResult
public PiecewisePolynomialResult(DoubleArray knots, DoubleMatrix coefMatrix, int order, int dim)
Creates an instance.- Parameters:
knots- the knotscoefMatrix- the coefMatrixorder- the orderdim- the dim
-
-
Method Detail
-
getKnots
public DoubleArray getKnots()
Access _knots.- Returns:
- the knots
-
getCoefMatrix
public DoubleMatrix getCoefMatrix()
Access _coefMatrix.- Returns:
- Coefficient Matrix
-
getNumberOfIntervals
public int getNumberOfIntervals()
Access _nIntervals.- Returns:
- Number of Intervals
-
getOrder
public int getOrder()
Access _order.- Returns:
- Number of coefficients in polynomial; 2 if _nIntervals=1, 3 if _nIntervals=2, 4 otherwise
-
getDimensions
public int getDimensions()
Access _dim.- Returns:
- Dimension of spline
-
-