Class Chol.CholMatrix
- java.lang.Object
-
- org.ujmp.core.doublematrix.calculation.general.decomposition.Chol.CholMatrix
-
-
Field Summary
Fields Modifier and Type Field 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).static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description CholMatrix(Matrix Arg)
Cholesky algorithm for symmetric and positive definite matrix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DenseDoubleMatrix2D
getL()
Return triangular factor.boolean
isSPD()
Is the matrix symmetric and positive definite?DenseDoubleMatrix2D
solve(Matrix B)
Solve A*X = B
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
L
private final double[][] L
Array for internal storage of decomposition.
-
n
private final int n
Row and column dimension (square matrix).
-
isspd
private boolean isspd
Symmetric and positive definite flag.
-
-
Constructor Detail
-
CholMatrix
public CholMatrix(Matrix Arg)
Cholesky algorithm for symmetric and positive definite matrix.- Parameters:
A
- Square, symmetric matrix.
-
-
Method Detail
-
isSPD
public final boolean isSPD()
Is the matrix symmetric and positive definite?- Returns:
- true if A is symmetric and positive definite.
-
getL
public final DenseDoubleMatrix2D getL()
Return triangular factor.- Returns:
- L
-
solve
public final DenseDoubleMatrix2D solve(Matrix B)
Solve A*X = B- Parameters:
B
- 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.java.lang.RuntimeException
- Matrix is not symmetric positive definite.
-
-