Class PiecewisePolynomialFunction2D
- java.lang.Object
-
- com.opengamma.strata.math.impl.function.PiecewisePolynomialFunction2D
-
public class PiecewisePolynomialFunction2D extends Object
Computes value, first derivative and integral of piecewise polynomial function.
-
-
Constructor Summary
Constructors Constructor Description PiecewisePolynomialFunction2D()
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleMatrix
differentiateCross(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys)
Finds the cross derivative.double
differentiateCross(PiecewisePolynomialResult2D pp, double x0Key, double x1Key)
Finds the cross derivative.DoubleMatrix
differentiateTwiceX0(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys)
Finds the second derivative.double
differentiateTwiceX0(PiecewisePolynomialResult2D pp, double x0Key, double x1Key)
Finds the second derivative.DoubleMatrix
differentiateTwiceX1(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys)
Finds the second derivative.double
differentiateTwiceX1(PiecewisePolynomialResult2D pp, double x0Key, double x1Key)
Finds the second derivative.DoubleMatrix
differentiateX0(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys)
Finds the first derivative.double
differentiateX0(PiecewisePolynomialResult2D pp, double x0Key, double x1Key)
Finds the first derivative.DoubleMatrix
differentiateX1(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys)
Finds the first derivative.double
differentiateX1(PiecewisePolynomialResult2D pp, double x0Key, double x1Key)
Finds the first derivative.DoubleMatrix
evaluate(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys)
Evaluates the function.double
evaluate(PiecewisePolynomialResult2D pp, double x0Key, double x1Key)
Evaluates the function.
-
-
-
Method Detail
-
evaluate
public double evaluate(PiecewisePolynomialResult2D pp, double x0Key, double x1Key)
Evaluates the function.- Parameters:
pp
- the PiecewisePolynomialResult2Dx0Key
- the first keyx1Key
- the second key- Returns:
- the value of piecewise polynomial function in 2D at (x0Key, x1Key)
-
evaluate
public DoubleMatrix evaluate(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys)
Evaluates the function.- Parameters:
pp
- the PiecewisePolynomialResult2Dx0Keys
- the first keysx1Keys
- the first keys- Returns:
- the values of piecewise polynomial function in 2D at (x0Keys_i, x1Keys_j)
-
differentiateX0
public double differentiateX0(PiecewisePolynomialResult2D pp, double x0Key, double x1Key)
Finds the first derivative.- Parameters:
pp
- the PiecewisePolynomialResult2Dx0Key
- the first keyx1Key
- the second key- Returns:
- the value of first derivative of two-dimensional piecewise polynomial function with respect to x0 at (x0Keys_i, x1Keys_j)
-
differentiateX1
public double differentiateX1(PiecewisePolynomialResult2D pp, double x0Key, double x1Key)
Finds the first derivative.- Parameters:
pp
- the PiecewisePolynomialResult2Dx0Key
- the first keyx1Key
- the second key- Returns:
- the value of first derivative of two-dimensional piecewise polynomial function with respect to x1 at (x0Keys_i, x1Keys_j)
-
differentiateX0
public DoubleMatrix differentiateX0(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys)
Finds the first derivative.- Parameters:
pp
- the PiecewisePolynomialResult2Dx0Keys
- the first keysx1Keys
- the second keys- Returns:
- Values of first derivative of two-dimensional piecewise polynomial function with respect to x0 at (x0Keys_i, x1Keys_j)
-
differentiateX1
public DoubleMatrix differentiateX1(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys)
Finds the first derivative.- Parameters:
pp
- the PiecewisePolynomialResult2Dx0Keys
- the first keysx1Keys
- the second keys- Returns:
- Values of first derivative of two-dimensional piecewise polynomial function with respect to x1 at (x0Keys_i, x1Keys_j)
-
differentiateCross
public double differentiateCross(PiecewisePolynomialResult2D pp, double x0Key, double x1Key)
Finds the cross derivative.- Parameters:
pp
- the PiecewisePolynomialResult2Dx0Key
- the first keyx1Key
- the second key- Returns:
- the value of cross derivative of two-dimensional piecewise polynomial function at (x0Keys_i, x1Keys_j)
-
differentiateTwiceX0
public double differentiateTwiceX0(PiecewisePolynomialResult2D pp, double x0Key, double x1Key)
Finds the second derivative.- Parameters:
pp
- the PiecewisePolynomialResult2Dx0Key
- the first keyx1Key
- the second key- Returns:
- the value of second derivative of two-dimensional piecewise polynomial function with respect to x0 at (x0Keys_i, x1Keys_j)
-
differentiateTwiceX1
public double differentiateTwiceX1(PiecewisePolynomialResult2D pp, double x0Key, double x1Key)
Finds the second derivative.- Parameters:
pp
- the PiecewisePolynomialResult2Dx0Key
- the first keyx1Key
- the second key- Returns:
- the value of second derivative of two-dimensional piecewise polynomial function with respect to x1 at (x0Keys_i, x1Keys_j)
-
differentiateCross
public DoubleMatrix differentiateCross(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys)
Finds the cross derivative.- Parameters:
pp
- the PiecewisePolynomialResult2Dx0Keys
- the first keysx1Keys
- the second keys- Returns:
- the values of cross derivative of two-dimensional piecewise polynomial function at (x0Keys_i, x1Keys_j)
-
differentiateTwiceX0
public DoubleMatrix differentiateTwiceX0(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys)
Finds the second derivative.- Parameters:
pp
- the PiecewisePolynomialResult2Dx0Keys
- the first keysx1Keys
- the second keys- Returns:
- the values of second derivative of two-dimensional piecewise polynomial function with respect to x0 at (x0Keys_i, x1Keys_j)
-
differentiateTwiceX1
public DoubleMatrix differentiateTwiceX1(PiecewisePolynomialResult2D pp, double[] x0Keys, double[] x1Keys)
Finds the second derivative.- Parameters:
pp
- the PiecewisePolynomialResult2Dx0Keys
- the first keysx1Keys
- the second keys- Returns:
- the values of second derivative of two-dimensional piecewise polynomial function with respect to x1 at (x0Keys_i, x1Keys_j)
-
-