Package no.uib.cipr.matrix
Class BandCholesky
- java.lang.Object
-
- no.uib.cipr.matrix.BandCholesky
-
public class BandCholesky extends java.lang.Object
Banded 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 BandCholesky
factor(LowerSPDBandMatrix A)
Creates a Cholesky decomposition of the given matrixBandCholesky
factor(UpperSPDBandMatrix A)
Creates a Cholesky decomposition of the given matrixstatic BandCholesky
factorize(LowerSPDBandMatrix A)
Creates a Cholesky decomposition of the given matrixstatic BandCholesky
factorize(UpperSPDBandMatrix A)
Creates a Cholesky decomposition of the given matrixLowerTriangBandMatrix
getL()
Returns the decomposition matrix.UpperTriangBandMatrix
getU()
Returns the decomposition matrix.boolean
isSPD()
Returns true if the matrix decomposed is symmetrical, positive definitedouble
rcond(Matrix A)
Computes the reciprocal condition numberDenseMatrix
solve(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
-
-