Package no.uib.cipr.matrix
Class BandCholesky
java.lang.Object
no.uib.cipr.matrix.BandCholesky
Banded Cholesky decomposition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a Cholesky decomposition of the given matrixCreates a Cholesky decomposition of the given matrixstatic BandCholeskyCreates a Cholesky decomposition of the given matrixstatic BandCholeskyCreates a Cholesky decomposition of the given matrixgetL()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) ComputesA\B, overwritingB
-
Constructor Details
-
BandCholesky
public BandCholesky(int n, int kd, boolean upper) Constructor for BandCholesky- Parameters:
n- Matrix sizekd- Number of matrix bandsupper- True for decomposing an upper symmetrical matrix, false for a lower symmetrical matrix
-
-
Method Details
-
factorize
Creates a Cholesky decomposition of the given matrix- Parameters:
A- Matrix to decompose. Not modified- Returns:
- A Cholesky decomposition of the matrix
-
factorize
Creates a Cholesky decomposition of the given matrix- Parameters:
A- Matrix to decompose. Not modified- Returns:
- A Cholesky decomposition of the matrix
-
factor
Creates a Cholesky decomposition of the given matrix- Parameters:
A- Matrix to decompose. Overwritten on return- Returns:
- The current decomposition
-
factor
Creates a Cholesky decomposition of the given matrix- Parameters:
A- Matrix to decompose. Overwritten on return- Returns:
- The current decomposition
-
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 -
isSPD
public boolean isSPD()Returns true if the matrix decomposed is symmetrical, positive definite -
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.
-
solve
ComputesA\B, overwritingB- Throws:
MatrixNotSPDException
-