Class ParameterizedCurveVectorFunction
- java.lang.Object
-
- com.opengamma.strata.math.impl.function.VectorFunction
-
- com.opengamma.strata.math.impl.function.ParameterizedCurveVectorFunction
-
- All Implemented Interfaces:
Function<DoubleArray,DoubleArray>
public class ParameterizedCurveVectorFunction extends VectorFunction
This is simply aVectorFunctionbacked by aParameterizedCurve.
-
-
Constructor Summary
Constructors Constructor Description ParameterizedCurveVectorFunction(double[] samplePoints, ParameterizedCurve curve)Creates an instance with a sampled (parameterised) curve.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleArrayapply(DoubleArray curveParameters)Build a curve given the parameters, then return its value at the sample points.DoubleMatrixcalculateJacobian(DoubleArray x)Calculate the Jacobian at a point $\mathbf{x}$.intgetLengthOfDomain()The length of the input vector $\mathbf{x}$.intgetLengthOfRange()The length of the output vector $\mathbf{y}$.
-
-
-
Constructor Detail
-
ParameterizedCurveVectorFunction
public ParameterizedCurveVectorFunction(double[] samplePoints, ParameterizedCurve curve)Creates an instance with a sampled (parameterised) curve.- Parameters:
samplePoints- the points where we sample the curvecurve- a parameterised curve
-
-
Method Detail
-
calculateJacobian
public DoubleMatrix calculateJacobian(DoubleArray x)
Description copied from class:VectorFunctionCalculate the Jacobian at a point $\mathbf{x}$. For a function $f: \mathbb{R}^m \to \mathbb{R}^n \quad x \mapsto f(x)$, the Jacobian is a n by m matrix.- Specified by:
calculateJacobianin classVectorFunction- Parameters:
x- the input vector $\mathbf{x}$- Returns:
- the Jacobian $\mathbf{J}$
-
getLengthOfDomain
public int getLengthOfDomain()
Description copied from class:VectorFunctionThe length of the input vector $\mathbf{x}$.- Specified by:
getLengthOfDomainin classVectorFunction- Returns:
- length of input vector (domain)
-
getLengthOfRange
public int getLengthOfRange()
Description copied from class:VectorFunctionThe length of the output vector $\mathbf{y}$.- Specified by:
getLengthOfRangein classVectorFunction- Returns:
- length of output vector (range)
-
apply
public DoubleArray apply(DoubleArray curveParameters)
Build a curve given the parameters, then return its value at the sample points.- Parameters:
curveParameters- the curve parameters- Returns:
- the curve value at the sample points
-
-