クラス テンプレート JAMA::Cholesky< Real >

#include <jama_cholesky.h>

すべてのメンバ一覧

Public メソッド

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

Private 変数

Array2D< Real > L_
int isspd


説明

template<class Real>
class JAMA::Cholesky< Real >

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<double> A(n,n);
	Array2D<double> L;

	 ...

	Cholesky<double> chol(A);

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

  	else
		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).

例:

cholesky.cpp.

jama_cholesky.h47 行で定義されています。


コンストラクタとデストラクタ

template<class Real >
JAMA::Cholesky< Real >::Cholesky (  )  [inline]

jama_cholesky.h64 行で定義されています。

template<class Real >
JAMA::Cholesky< Real >::Cholesky ( const Array2D< Real > &  A  )  [inline]

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.

jama_cholesky.h92 行で定義されています。

参照先 TNT::Array2D< T >::dim1(), TNT::Array2D< T >::dim2(), JAMA::Cholesky< Real >::isspd, と JAMA::Cholesky< Real >::L_.


関数

template<class Real >
Array2D< Real > JAMA::Cholesky< Real >::getL (  )  const [inline]

戻り値:
the lower triangular factor, L, such that L*L'=A.

jama_cholesky.h80 行で定義されています。

参照先 JAMA::Cholesky< Real >::L_.

template<class Real >
int JAMA::Cholesky< Real >::is_spd (  )  const [inline]

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

jama_cholesky.h71 行で定義されています。

参照先 JAMA::Cholesky< Real >::isspd.

template<class Real >
Array2D< Real > JAMA::Cholesky< Real >::solve ( const Array2D< Real > &  B  )  [inline]

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

引数:
B 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.

jama_cholesky.h188 行で定義されています。

参照先 TNT::Array2D< T >::copy(), TNT::Array2D< T >::dim1(), TNT::Array2D< T >::dim2(), と JAMA::Cholesky< Real >::L_.

template<class Real >
Array1D< Real > JAMA::Cholesky< Real >::solve ( const Array1D< Real > &  b  )  [inline]

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

引数:
b 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.

jama_cholesky.h146 行で定義されています。

参照先 TNT::Array1D< T >::copy(), TNT::Array1D< T >::dim1(), TNT::Array2D< T >::dim1(), と JAMA::Cholesky< Real >::L_.


変数

template<class Real >
int JAMA::Cholesky< Real >::isspd [private]

jama_cholesky.h50 行で定義されています。

参照元 JAMA::Cholesky< Real >::Cholesky(), と JAMA::Cholesky< Real >::is_spd().

template<class Real >
Array2D<Real> JAMA::Cholesky< Real >::L_ [private]


このクラスの説明は次のファイルから生成されました:

TNTに対してThu Nov 13 00:45:18 2008に生成されました。  doxygen 1.5.7.1