public class PiecewisePolynomialFunction1D extends Object
PiecewisePolynomialResult, Compute value, first derivative
and integral of piecewise polynomial function.| Constructor and Description |
|---|
PiecewisePolynomialFunction1D()
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
DoubleArray |
differentiate(PiecewisePolynomialResult pp,
double xKey)
Finds the first derivatives.
|
DoubleMatrix |
differentiate(PiecewisePolynomialResult pp,
double[] xKeys)
Finds the first derivatives.
|
DoubleArray |
differentiateTwice(PiecewisePolynomialResult pp,
double xKey)
Finds the second derivatives.
|
DoubleMatrix |
differentiateTwice(PiecewisePolynomialResult pp,
double[] xKeys)
Finds the second derivatives.
|
DoubleArray |
evaluate(PiecewisePolynomialResult pp,
double xKey)
Evaluates the function.
|
DoubleMatrix |
evaluate(PiecewisePolynomialResult pp,
double[] xKeys)
Evaluates the function.
|
DoubleMatrix[] |
evaluate(PiecewisePolynomialResult pp,
double[][] xKeys)
Evaluates the function.
|
ValueDerivatives |
evaluateAndDifferentiate(PiecewisePolynomialResult pp,
double xKey)
Evaluates the function and its first derivative.
|
protected double |
getValue(double[] coefs,
double x,
double leftknot) |
protected double |
getValue(DoubleArray coefs,
double x,
double leftknot) |
double |
integrate(PiecewisePolynomialResult pp,
double initialKey,
double xKey)
Integration.
|
DoubleArray |
integrate(PiecewisePolynomialResult pp,
double initialKey,
double[] xKeys)
Integration.
|
public PiecewisePolynomialFunction1D()
public DoubleArray evaluate(PiecewisePolynomialResult pp, double xKey)
pp - the PiecewisePolynomialResultxKey - the keypublic DoubleMatrix evaluate(PiecewisePolynomialResult pp, double[] xKeys)
pp - the PiecewisePolynomialResultxKeys - the keypublic DoubleMatrix[] evaluate(PiecewisePolynomialResult pp, double[][] xKeys)
pp - the PiecewisePolynomialResultxKeys - the keypublic DoubleArray differentiate(PiecewisePolynomialResult pp, double xKey)
pp - the PiecewisePolynomialResultxKey - the keypublic DoubleMatrix differentiate(PiecewisePolynomialResult pp, double[] xKeys)
pp - the PiecewisePolynomialResultxKeys - the keypublic DoubleArray differentiateTwice(PiecewisePolynomialResult pp, double xKey)
pp - the PiecewisePolynomialResultxKey - the keypublic DoubleMatrix differentiateTwice(PiecewisePolynomialResult pp, double[] xKeys)
pp - the PiecewisePolynomialResultxKeys - the keypublic double integrate(PiecewisePolynomialResult pp, double initialKey, double xKey)
pp - the PiecewisePolynomialResultinitialKey - the initial keyxKey - the keypublic DoubleArray integrate(PiecewisePolynomialResult pp, double initialKey, double[] xKeys)
pp - the PiecewisePolynomialResultinitialKey - the initial keyxKeys - the keyspublic ValueDerivatives evaluateAndDifferentiate(PiecewisePolynomialResult pp, double xKey)
The dimension of PiecewisePolynomialResult must be 1.
pp - the PiecewisePolynomialResultxKey - the keyprotected double getValue(DoubleArray coefs, double x, double leftknot)
coefs - {a_n,a_{n-1},...} of f(x) = a_n x^{n} + a_{n-1} x^{n-1} + ....x - the x-valueleftknot - the knot specifying underlying interpolation functionprotected double getValue(double[] coefs,
double x,
double leftknot)
coefs - {a_n,a_{n-1},...} of f(x) = a_n x^{n} + a_{n-1} x^{n-1} + ....x - the x-valueleftknot - the knot specifying underlying interpolation functionCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.