Package no.uib.cipr.matrix
Class PackCholesky
java.lang.Object
no.uib.cipr.matrix.PackCholesky
Packed Cholesky decomposition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCalculates a Cholesky decompositionCalculates a Cholesky decompositionstatic PackCholeskyCalculates a Cholesky decompositiongetL()Returns the decomposition matrix.getU()Returns the decomposition matrix.booleanisSPD()Returns true if the matrix decomposed is symmetrical, positive definitedoubleComputes the reciprocal condition numbersolve(DenseMatrix B) Solves forB, overwriting it on return
-
Constructor Details
-
PackCholesky
public PackCholesky(int n, boolean upper) Constructor for DenseCholesky- Parameters:
n- Matrix sizeupper- True for decomposing an upper symmetrical matrix, false for a lower symmetrical matrix
-
-
Method Details
-
factorize
Calculates a Cholesky decomposition- Parameters:
A- Matrix to decompose. Not modified- Returns:
- The current decomposition
-
factor
Calculates a Cholesky decomposition- Parameters:
A- Matrix to decompose. Overwritten on return- Returns:
- The current decomposition
-
factor
Calculates a Cholesky decomposition- Parameters:
A- Matrix to decompose. Overwritten on return- Returns:
- The current decomposition
-
isSPD
public boolean isSPD()Returns true if the matrix decomposed is symmetrical, positive definite -
getL
Returns the decomposition matrix. Only valid for decomposition of a lower SPD matrix -
getU
Returns the decomposition matrix. Only valid for decomposition of a upper SPD matrix -
solve
Solves forB, overwriting it on return- Throws:
MatrixNotSPDException
-
rcond
Computes the reciprocal condition number- Parameters:
A- The matrix this is a decomposition of- Returns:
- The reciprocal condition number. Values close to unity indicate a well-conditioned system, while numbers close to zero do not.
-