Class ConcatenatedVectorFunction
- java.lang.Object
-
- com.opengamma.strata.math.impl.function.VectorFunction
-
- com.opengamma.strata.math.impl.function.ConcatenatedVectorFunction
-
- All Implemented Interfaces:
Function<DoubleArray,DoubleArray>
public class ConcatenatedVectorFunction extends VectorFunction
For the set of $k$ vector functions $f_i: \mathbb{R}^{m_i} \to \mathbb{R}^{n_i} \quad x_i \mapsto f_i(x_i) = y_i$ this forms the function $f: \mathbb{R}^{m} \to \mathbb{R}^{n} \quad x_i \mapsto f(x) = y$ where $n = \sum_{i=1}^k n_i$ and $m = \sum_{i=1}^k m_i$ and $x = (x_1,x_2,\dots,x_k)$ \& $y = (y_1,y_2,\dots,y_k)$.
-
-
Constructor Summary
Constructors Constructor Description ConcatenatedVectorFunction(VectorFunction[] functions)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleArray
apply(DoubleArray x)
DoubleMatrix
calculateJacobian(DoubleArray x)
Calculate the Jacobian at a point $\mathbf{x}$.int
getLengthOfDomain()
The length of the input vector $\mathbf{x}$.int
getLengthOfRange()
The length of the output vector $\mathbf{y}$.
-
-
-
Constructor Detail
-
ConcatenatedVectorFunction
public ConcatenatedVectorFunction(VectorFunction[] functions)
Creates an instance.This creates the concatenated function, in the order that the sub functions are given.
- Parameters:
functions
- the sub functions
-
-
Method Detail
-
calculateJacobian
public DoubleMatrix calculateJacobian(DoubleArray x)
Description copied from class:VectorFunction
Calculate 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:
calculateJacobian
in classVectorFunction
- Parameters:
x
- the input vector $\mathbf{x}$- Returns:
- the Jacobian $\mathbf{J}$
-
apply
public DoubleArray apply(DoubleArray x)
-
getLengthOfDomain
public int getLengthOfDomain()
Description copied from class:VectorFunction
The length of the input vector $\mathbf{x}$.- Specified by:
getLengthOfDomain
in classVectorFunction
- Returns:
- length of input vector (domain)
-
getLengthOfRange
public int getLengthOfRange()
Description copied from class:VectorFunction
The length of the output vector $\mathbf{y}$.- Specified by:
getLengthOfRange
in classVectorFunction
- Returns:
- length of output vector (range)
-
-