留学生辅导 TemplateJAMA::Cholesky class Reference

TemplateJAMA::Cholesky class Reference

Main Page   Namespace List   Compound List   File List   Compound Members  

Copyright By PowCoder代写 加微信 powcoder

JAMA::Cholesky Class Template Reference
#include

List of all members.
Public Methods

  Cholesky ()
  Cholesky (const Array2D< Real > &A)
Array2D  getL () const
Array1D  solve (const Array1D< Real > &B)
Array2D  solve (const Array2D< Real > &B)
int  is_spd () const
  Cholesky ()
  Cholesky (const TNT::Array2D< Real > &A)
TNT::Array2D  getL () const
int  is_spd () const

Detailed Description

template 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.

Typical usage looks like:

Array2D A(n,n);
Array2D L;

Cholesky chol(A);

if (chol.is_spd())
L = chol.getL();

cout << "factorization was not complete.\n"; (Adapted from JAMA, a Java Matrix Library, developed by jointly by the Mathworks and NIST; see http://math.nist.gov/javanumerics/jama). Constructor & Destructor Documentation template

JAMA::Cholesky< Real >::Cholesky (

 

template

JAMA::Cholesky< Real >::Cholesky (

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

JAMA::Cholesky< Real >::Cholesky (

 

template

JAMA::Cholesky< Real >::Cholesky (

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

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

 

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

template

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

 

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

template

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

 

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

template

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

 

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

template

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:

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

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

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:

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

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: jama_cholesky.h
jama_cholesky_old.h

Generated at Mon Jan 20 07:47:18 2003 for JAMA/C++ by

1.2.5 written by Dimitri van Heesch,
© 1997-2001

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com