public class CholeskyDecomposition extends java.lang.Object implements java.io.Serializable, RevisionHandler
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.
Adapted from the JAMA package.Constructor and Description |
---|
CholeskyDecomposition(Matrix Arg)
Cholesky algorithm for symmetric and positive definite matrix.
|
Modifier and Type | Method and Description |
---|---|
Matrix |
getL()
Return triangular factor.
|
java.lang.String |
getRevision()
Returns the revision string.
|
boolean |
isSPD()
Is the matrix symmetric and positive definite?
|
Matrix |
solve(Matrix B)
Solve A*X = B
|
public CholeskyDecomposition(Matrix Arg)
Arg
- Square, symmetric matrix.public boolean isSPD()
public Matrix getL()
public Matrix solve(Matrix B)
B
- A Matrix with as many rows as A and any number of columns.java.lang.IllegalArgumentException
- Matrix row dimensions must agree.java.lang.RuntimeException
- Matrix is not symmetric positive definite.public java.lang.String getRevision()
getRevision
in interface RevisionHandler