Class PiecewisePolynomialResultsWithSensitivity
- java.lang.Object
-
- com.opengamma.strata.math.impl.interpolation.PiecewisePolynomialResult
-
- com.opengamma.strata.math.impl.interpolation.PiecewisePolynomialResultsWithSensitivity
-
public class PiecewisePolynomialResultsWithSensitivity extends PiecewisePolynomialResult
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 which are in the super class, and _coeffSense Node sensitivity of the coefficients _coeffSense[i].get(j, k) is \frac{\partial a^i_{n-j}}{\partial y_k}
-
-
Constructor Summary
Constructors Constructor Description PiecewisePolynomialResultsWithSensitivity(DoubleArray knots, DoubleMatrix coefMatrix, int order, int dim, DoubleMatrix[] coeffSense)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
DoubleMatrix
getCoefficientSensitivity(int interval)
Access _coeffSense for the i-th interval.DoubleMatrix[]
getCoefficientSensitivityAll()
Access _coeffSense.int
hashCode()
-
Methods inherited from class com.opengamma.strata.math.impl.interpolation.PiecewisePolynomialResult
getCoefMatrix, getDimensions, getKnots, getNumberOfIntervals, getOrder
-
-
-
-
Constructor Detail
-
PiecewisePolynomialResultsWithSensitivity
public PiecewisePolynomialResultsWithSensitivity(DoubleArray knots, DoubleMatrix coefMatrix, int order, int dim, DoubleMatrix[] coeffSense)
- Parameters:
knots
- the knotscoefMatrix
- the coefMatrixorder
- the orderdim
- the dimcoeffSense
- the sensitivity of the coefficients to the nodes (y-values)
-
-
Method Detail
-
getCoefficientSensitivityAll
public DoubleMatrix[] getCoefficientSensitivityAll()
Access _coeffSense.- Returns:
- _coeffSense
-
getCoefficientSensitivity
public DoubleMatrix getCoefficientSensitivity(int interval)
Access _coeffSense for the i-th interval.- Parameters:
interval
- the interval- Returns:
- _coeffSense for the i-th interval
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classPiecewisePolynomialResult
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classPiecewisePolynomialResult
-
-