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 doubleDEFAULT_POSITIVITY_THRESHOLDIn the decomposition, the positivity of the matrix is checked.static doubleDEFAULT_SYMMETRY_THRESHOLDThe input matrix symmetry is checked.
-
Constructor Summary
Constructors Constructor Description CholeskyDecompositionOpenGamma()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CholeskyDecompositionResultapply(DoubleMatrix x)Applies this function to the given argument.CholeskyDecompositionResultevaluate(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:
applyin interfaceDecomposition<CholeskyDecompositionResult>- Specified by:
applyin 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.
-
-