edu.mines.jtk.lapack
Class DMatrixChd

java.lang.Object
  extended by edu.mines.jtk.lapack.DMatrixChd

public class DMatrixChd
extends java.lang.Object

Cholesky decomposition of a symmetric positive-definite matrix A. For a symmetric positive-definite matrix a, the Cholesky decomposition is A = L*L', where L is a lower triangular matrix.

Version:
2005.12.12
Author:
Dave Hale, Colorado School of Mines

Constructor Summary
DMatrixChd(DMatrix a)
          Constructs a Cholesky decomposition of the specified matrix A.
 
Method Summary
 double det()
          Returns the determinant of the matrix A.
 DMatrix getL()
          Gets the lower triangular factor L.
 boolean isPositiveDefinite()
          Determines whether the matrix A is positive definite.
 DMatrix solve(DMatrix b)
          Returns the solution X of the linear system A*X = B.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DMatrixChd

public DMatrixChd(DMatrix a)
Constructs a Cholesky decomposition of the specified matrix A. The matrix A must be symmetric. For efficiency, this condition is assumed and not checked. That is, only the lower triangular part of A is used to perform the decomposition.

Parameters:
a - the matrix.
Method Detail

isPositiveDefinite

public boolean isPositiveDefinite()
Determines whether the matrix A is positive definite. (The matrix A was assumed to be symmetric when this decomposition was constructed.) If not symmetric and positive-definite, then this decomposition cannot be used to solve systems of linear equations.

Returns:
true, if positive-definite; false, otherwise.

getL

public DMatrix getL()
Gets the lower triangular factor L.

Returns:
the factor L.

det

public double det()
Returns the determinant of the matrix A.

Returns:
the determinant.

solve

public DMatrix solve(DMatrix b)
Returns the solution X of the linear system A*X = B. The matrix A must be symmetric and positive-definite. Also, the matrices A and B must have the same number of rows.

Parameters:
b - the right-hand-side matrix B.
Returns:
the solution matrix X.