Detailed Description

template<class Real> class JAMA::Cholesky

For a symmetric, positive definite matrix A, this function computes the Cholesky factorization, i.e. it computes a lower triangular matrix L such that A = L*L'. If the matrix is not symmetric or positive definite, the function computes only a partial decomposition. This can be tested with the is_spd() flag.

Constructor & Destructor Documentation

template<class Real>

JAMA::Cholesky< Real >::Cholesky<Real> (

)

template<class Real>

JAMA::Cholesky< Real >::Cholesky<Real> (

const Array2D< Real > & A )

Constructs a lower triangular matrix L, such that L*L'= A. If A is not symmetric positive-definite (SPD), only a partial factorization is performed. If is_spd() evalutate true (1) then the factorizaiton was successful.

template<class Real>

JAMA::Cholesky< Real >::Cholesky<Real> (

)

template<class Real>

JAMA::Cholesky< Real >::Cholesky<Real> (

const TNT::Array2D< Real > & A )

Constructs a lower triangular matrix L, such that L*L'= A. If A is not symmetric positive-definite (SPD), only a partial factorization is performed. If is_spd() evalutate true (1) then the factorizaiton was successful.

Member Function Documentation

template<class Real>

TNT::Array2D< Real > JAMA::Cholesky< Real >::getL (

) const

Returns:

the lower triangular factor, L, such that L*L'=A.

template<class Real>

TNT::Array2D< Real > JAMA::Cholesky< Real >::getL (

) const

Returns:

the lower triangular factor, L, such that L*L'=A.

template<class Real>

int JAMA::Cholesky< Real >::is_spd (

) const

Returns:

1, if original matrix to be factored was symmetric positive-definite (SPD).

template<class Real>

int JAMA::Cholesky< Real >::is_spd (

) const

Returns:

1, if original matrix to be factored was symmetric positive-definite (SPD).

template<class Real>

Array2D< Real > JAMA::Cholesky< Real >::solve (

const Array2D< Real > & B )

Solve a linear system A*X = B, using the previously computed cholesky factorization of A: L*L'.

Parameters:

B

A Matrix with as many rows as A and any number of columns.

Returns:

X so that L*L'*X = B. If B is nonconformat, or if A was not symmetric posidtive definite, a null (0x0) array is returned.

template<class Real>

Array1D< Real > JAMA::Cholesky< Real >::solve (

const Array1D< Real > & b )

Solve a linear system A*x = b, using the previously computed cholesky factorization of A: L*L'.

Parameters:

B

A Matrix with as many rows as A and any number of columns.

Returns:

x so that L*L'*x = b. If b is nonconformat, or if A was not symmetric posidtive definite, a null (0x0) array is returned.

The documentation for this class was generated from the following files: