Package no.uib.cipr.matrix
Class BandCholesky
- java.lang.Object
-
- no.uib.cipr.matrix.BandCholesky
-
public class BandCholesky extends java.lang.ObjectBanded Cholesky decomposition
-
-
Constructor Summary
Constructors Constructor Description BandCholesky(int n, int kd, boolean upper)Constructor for BandCholesky
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BandCholeskyfactor(LowerSPDBandMatrix A)Creates a Cholesky decomposition of the given matrixBandCholeskyfactor(UpperSPDBandMatrix A)Creates a Cholesky decomposition of the given matrixstatic BandCholeskyfactorize(LowerSPDBandMatrix A)Creates a Cholesky decomposition of the given matrixstatic BandCholeskyfactorize(UpperSPDBandMatrix A)Creates a Cholesky decomposition of the given matrixLowerTriangBandMatrixgetL()Returns the decomposition matrix.UpperTriangBandMatrixgetU()Returns the decomposition matrix.booleanisSPD()Returns true if the matrix decomposed is symmetrical, positive definitedoublercond(Matrix A)Computes the reciprocal condition numberDenseMatrixsolve(DenseMatrix B)ComputesA\B, overwritingB
-
-
-
Method Detail
-
factorize
public static BandCholesky factorize(LowerSPDBandMatrix A)
Creates a Cholesky decomposition of the given matrix- Parameters:
A- Matrix to decompose. Not modified- Returns:
- A Cholesky decomposition of the matrix
-
factorize
public static BandCholesky factorize(UpperSPDBandMatrix A)
Creates a Cholesky decomposition of the given matrix- Parameters:
A- Matrix to decompose. Not modified- Returns:
- A Cholesky decomposition of the matrix
-
factor
public BandCholesky factor(LowerSPDBandMatrix A)
Creates a Cholesky decomposition of the given matrix- Parameters:
A- Matrix to decompose. Overwritten on return- Returns:
- The current decomposition
-
factor
public BandCholesky factor(UpperSPDBandMatrix A)
Creates a Cholesky decomposition of the given matrix- Parameters:
A- Matrix to decompose. Overwritten on return- Returns:
- The current decomposition
-
getL
public LowerTriangBandMatrix getL()
Returns the decomposition matrix. Only valid for decomposition of a lower SPD matrix
-
getU
public UpperTriangBandMatrix 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
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.
-
solve
public DenseMatrix solve(DenseMatrix B) throws MatrixNotSPDException
ComputesA\B, overwritingB- Throws:
MatrixNotSPDException
-
-