org.jquantlib.math.matrixutilities
Class CholeskyDecomposition
- java.lang.Object
-
- org.jquantlib.math.matrixutilities.CholeskyDecomposition
-
public class CholeskyDecomposition extends java.lang.ObjectCholesky Decomposition.For a symmetric, positive definite matrix A, the Cholesky decomposition is an lower triangular matrix L so that A = L*L'.
If the matrix is not symmetric or positive definite, the constructor returns a partial decomposition and sets an internal flag that may be queried by the isSPD() method.
- See Also:
- JAMA
-
-
Constructor Summary
Constructors Constructor and Description CholeskyDecomposition(Matrix A)Cholesky algorithm for symmetric and positive definite matrix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanisSPD()Is the matrix symmetric and positive definite?MatrixL()Return triangular factor.Matrixsolve(Matrix B)Solve A*X = B
-
-
-
Constructor Detail
-
CholeskyDecomposition
public CholeskyDecomposition(Matrix A)
Cholesky algorithm for symmetric and positive definite matrix.- Parameters:
A- is a square, symmetric matrix.
-
-
Method Detail
-
isSPD
public boolean isSPD()
Is the matrix symmetric and positive definite?- Returns:
- true if A is symmetric and positive definite.
-
L
public Matrix L()
Return triangular factor.- Returns:
- L
-
solve
public Matrix solve(Matrix B)
Solve A*X = B- Parameters:
m- a Matrix with as many rows as A and any number of columns.- Returns:
- X so that L*L'*X = B
- Throws:
java.lang.IllegalArgumentException- Matrix row dimensions must agree.LibraryException- Matrix is not symmetric positive definite.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG