public class CholeskyDecomposition extends Object implements Serializable
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.
Modifier and Type | Field and Description |
---|---|
private boolean |
isspd
Symmetric and positive definite flag.
|
private double[][] |
L
Array for internal storage of decomposition.
|
private int |
n
Row and column dimension (square matrix).
|
Constructor and Description |
---|
CholeskyDecomposition(Matrix Arg)
Cholesky algorithm for symmetric and positive definite matrix.
|
private double[][] L
private int n
private boolean isspd
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.IllegalArgumentException
- Matrix row dimensions must agree.RuntimeException
- Matrix is not symmetric positive definite.Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.