Package no.uib.cipr.matrix
Class PackCholesky
- java.lang.Object
-
- no.uib.cipr.matrix.PackCholesky
-
public class PackCholesky extends java.lang.ObjectPacked Cholesky decomposition
-
-
Constructor Summary
Constructors Constructor Description PackCholesky(int n, boolean upper)Constructor for DenseCholesky
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PackCholeskyfactor(LowerSPDPackMatrix A)Calculates a Cholesky decompositionPackCholeskyfactor(UpperSPDPackMatrix A)Calculates a Cholesky decompositionstatic PackCholeskyfactorize(Matrix A)Calculates a Cholesky decompositionLowerTriangPackMatrixgetL()Returns the decomposition matrix.UpperTriangPackMatrixgetU()Returns the decomposition matrix.booleanisSPD()Returns true if the matrix decomposed is symmetrical, positive definitedoublercond(Matrix A)Computes the reciprocal condition numberDenseMatrixsolve(DenseMatrix B)Solves forB, overwriting it on return
-
-
-
Method Detail
-
factorize
public static PackCholesky factorize(Matrix A)
Calculates a Cholesky decomposition- Parameters:
A- Matrix to decompose. Not modified- Returns:
- The current decomposition
-
factor
public PackCholesky factor(LowerSPDPackMatrix A)
Calculates a Cholesky decomposition- Parameters:
A- Matrix to decompose. Overwritten on return- Returns:
- The current decomposition
-
factor
public PackCholesky factor(UpperSPDPackMatrix A)
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
public LowerTriangPackMatrix getL()
Returns the decomposition matrix. Only valid for decomposition of a lower SPD matrix
-
getU
public UpperTriangPackMatrix getU()
Returns the decomposition matrix. Only valid for decomposition of a upper SPD matrix
-
solve
public DenseMatrix solve(DenseMatrix B) throws MatrixNotSPDException
Solves forB, overwriting it on return- Throws:
MatrixNotSPDException
-
rcond
public double rcond(Matrix A)
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.
-
-