no.uib.cipr.matrix
Class BandCholesky

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

public class BandCholesky
extends java.lang.Object

Banded Cholesky decomposition


Constructor Summary
BandCholesky(int n, int kd, boolean upper)
          Constructor for BandCholesky
 
Method Summary
 BandCholesky factor(LowerSPDBandMatrix A)
          Creates a Cholesky decomposition of the given matrix
 BandCholesky factor(UpperSPDBandMatrix A)
          Creates a Cholesky decomposition of the given matrix
static BandCholesky factorize(LowerSPDBandMatrix A)
          Creates a Cholesky decomposition of the given matrix
static BandCholesky factorize(UpperSPDBandMatrix A)
          Creates a Cholesky decomposition of the given matrix
 LowerTriangBandMatrix getL()
          Returns the decomposition matrix.
 UpperTriangBandMatrix 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)
          Computes A\B, overwriting B
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BandCholesky

public BandCholesky(int n,
                    int kd,
                    boolean upper)
Constructor for BandCholesky

Parameters:
n - Matrix size
kd - Number of matrix bands
upper - True for decomposing an upper symmetrical matrix, false for a lower symmetrical matrix
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
Computes A\B, overwriting B

Throws:
MatrixNotSPDException