no.uib.cipr.matrix
Class DenseCholesky

java.lang.Object
  extended by no.uib.cipr.matrix.DenseCholesky

public class DenseCholesky
extends java.lang.Object

Dense Cholesky decomposition


Constructor Summary
DenseCholesky(int n, boolean upper)
          Constructor for DenseCholesky
 
Method Summary
 DenseCholesky factor(LowerSPDDenseMatrix A)
          Calculates a Cholesky decomposition
 DenseCholesky factor(UpperSPDDenseMatrix A)
          Calculates a Cholesky decomposition
static DenseCholesky factorize(Matrix A)
          Calculates a Cholesky decomposition
 LowerTriangDenseMatrix getL()
          Returns the decomposition matrix.
 UpperTriangDenseMatrix getU()
          Returns the decomposition matrix.
 boolean isSPD()
          Returns true if the matrix decomposed is symmetrical, positive definite
 double rcond(Matrix A)
          Computes the reciprocal condition number
 DenseMatrix solve(DenseMatrix B)
          Solves for B, overwriting it on return
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DenseCholesky

public DenseCholesky(int n,
                     boolean upper)
Constructor for DenseCholesky

Parameters:
n - Matrix size
upper - True for decomposing an upper symmetrical matrix, false for a lower symmetrical matrix
Method Detail

factorize

public static DenseCholesky factorize(Matrix A)
Calculates a Cholesky decomposition

Parameters:
A - Matrix to decompose. Not modified
Returns:
The current decomposition

factor

public DenseCholesky factor(LowerSPDDenseMatrix A)
Calculates a Cholesky decomposition

Parameters:
A - Matrix to decompose. Overwritten on return
Returns:
The current decomposition

factor

public DenseCholesky factor(UpperSPDDenseMatrix 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 LowerTriangDenseMatrix getL()
Returns the decomposition matrix. Only valid for decomposition of a lower SPD matrix


getU

public UpperTriangDenseMatrix getU()
Returns the decomposition matrix. Only valid for decomposition of a upper SPD matrix


solve

public DenseMatrix solve(DenseMatrix B)
                  throws MatrixNotSPDException
Solves for B, 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.