Class CholeskyDecompositionOpenGamma
- java.lang.Object
-
- com.opengamma.strata.math.impl.linearalgebra.CholeskyDecompositionOpenGamma
-
- All Implemented Interfaces:
Decomposition<CholeskyDecompositionResult>
,Function<DoubleMatrix,CholeskyDecompositionResult>
public class CholeskyDecompositionOpenGamma extends Object implements Decomposition<CholeskyDecompositionResult>
OpenGamma implementation of the Cholesky decomposition and its differentiation.
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_POSITIVITY_THRESHOLD
In the decomposition, the positivity of the matrix is checked.static double
DEFAULT_SYMMETRY_THRESHOLD
The input matrix symmetry is checked.
-
Constructor Summary
Constructors Constructor Description CholeskyDecompositionOpenGamma()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CholeskyDecompositionResult
apply(DoubleMatrix x)
Applies this function to the given argument.CholeskyDecompositionResult
evaluate(DoubleMatrix matrix, double symmetryThreshold, double positivityThreshold)
Perform the decomposition with a given symmetry and positivity threshold.
-
-
-
Field Detail
-
DEFAULT_SYMMETRY_THRESHOLD
public static final double DEFAULT_SYMMETRY_THRESHOLD
The input matrix symmetry is checked. If the relative difference abs(Aij-Aji) > max(abs(Aij), abs(Aji)) * e_sym, the matrix is considered non-symmetric. The default value for the threshold e_sym.- See Also:
- Constant Field Values
-
DEFAULT_POSITIVITY_THRESHOLD
public static final double DEFAULT_POSITIVITY_THRESHOLD
In the decomposition, the positivity of the matrix is checked. If the absolute value Lii < e_pos the matrix is considered non-positive. The default value for the threshold e_pos.- See Also:
- Constant Field Values
-
-
Method Detail
-
apply
public CholeskyDecompositionResult apply(DoubleMatrix x)
Applies this function to the given argument.- Specified by:
apply
in interfaceDecomposition<CholeskyDecompositionResult>
- Specified by:
apply
in interfaceFunction<DoubleMatrix,CholeskyDecompositionResult>
- Parameters:
x
- the input matrix- Returns:
- the resulting decomposition
-
evaluate
public CholeskyDecompositionResult evaluate(DoubleMatrix matrix, double symmetryThreshold, double positivityThreshold)
Perform the decomposition with a given symmetry and positivity threshold.- Parameters:
matrix
- The matrix to decompose.symmetryThreshold
- The symmetry threshold.positivityThreshold
- The positivity threshold.- Returns:
- The Cholesky decomposition.
-
-