numericalMethods.algebra.linear.decompose
Class Cholesky

java.lang.Object
  |
  +--numericalMethods.algebra.linear.decompose.Cholesky

public class Cholesky
extends java.lang.Object

Computes the cholesky decomposition of a symmetric positive-definite Matrix and can therefore test whether a symmetric matrix is positive-definite.


Method Summary
static boolean decomposable(double[][] A)
          Invokes decomposable(double [][], double ) with a tolerance of eps = 1e-14.
static boolean decomposable(double[][] A, double eps)
          Checks if A has a cholesky decomposition, which is, if A is symmetric and positive definite.
static void decompose(double[][] A, double[][] L)
          Computes the cholesky decomposition of matrix A and stores the result in L .
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

decompose

public static void decompose(double[][] A,
                             double[][] L)
Computes the cholesky decomposition of matrix A and stores the result in L . L may be null and also coincide with A . The method only uses the upper right part of A and does not test its symmetrie. The method considers the length of A as the dimension of the space and does not check any ranges.

Parameters:
A - The matrix to decompose.
L - The matrix to store result in.
Throws:
IllgealArgumentException - if A is not positive-definite

decomposable

public static boolean decomposable(double[][] A,
                                   double eps)
Checks if A has a cholesky decomposition, which is, if A is symmetric and positive definite. For the symmetric part it allows a tolerance of eps. To check for positive definiteness it uses decompose(double[][],double[][]). The method considers the length of A as the dimension of the space and does not check any ranges.

Parameters:
A - The matrix to check
eps - The tolerance of check

decomposable

public static boolean decomposable(double[][] A)
Invokes decomposable(double [][], double ) with a tolerance of eps = 1e-14.

Parameters:
A - The Matrix to check decomposition