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

#include <jama_lu.h>

すべてのメンバ一覧

Public メソッド

 LU (const Array2D< Real > &A)
int isNonsingular ()
Array2D< Real > getL ()
Array2D< Real > getU ()
Array1D< int > getPivot ()
Real det ()
Array2D< Real > solve (const Array2D< Real > &B)
Array1D< Real > solve (const Array1D< Real > &b)

Private メソッド

Array2D< Real > permute_copy (const Array2D< Real > &A, const Array1D< int > &piv, int j0, int j1)
Array1D< Real > permute_copy (const Array1D< Real > &A, const Array1D< int > &piv)

Private 変数

Array2D< Real > LU_
int m
int n
int pivsign
Array1D< int > piv


説明

template<class Real>
class JAMA::LU< Real >

LU Decomposition.

For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n unit lower triangular matrix L, an n-by-n upper triangular matrix U, and a permutation vector piv of length m so that A(piv,:) = L*U. If m < n, then L is m-by-m and U is m-by-n.

The LU decompostion with pivoting always exists, even if the matrix is singular, so the constructor will never fail. The primary use of the LU decomposition is in the solution of square systems of simultaneous linear equations. This will fail if isNonsingular() returns false.

例:

lu.cpp.

jama_lu.h27 行で定義されています。


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

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

LU Decomposition

引数:
A Rectangular matrix
戻り値:
LU Decomposition object to access L, U and piv.

jama_lu.h77 行で定義されています。

参照先 JAMA::LU< Real >::LU_, JAMA::LU< Real >::m, JAMA::LU< Real >::n, JAMA::LU< Real >::piv, と JAMA::LU< Real >::pivsign.


関数

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

Compute determinant using LU factors.

戻り値:
determinant of A, or 0 if A is not square.

jama_lu.h214 行で定義されています。

参照先 JAMA::LU< Real >::LU_, JAMA::LU< Real >::m, JAMA::LU< Real >::n, と JAMA::LU< Real >::pivsign.

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

Return lower triangular factor

戻り値:
L

jama_lu.h167 行で定義されています。

参照先 JAMA::LU< Real >::LU_, JAMA::LU< Real >::m, と JAMA::LU< Real >::n.

template<class Real >
Array1D<int> JAMA::LU< Real >::getPivot (  )  [inline]

Return pivot permutation vector

戻り値:
piv

jama_lu.h205 行で定義されています。

参照先 JAMA::LU< Real >::piv.

template<class Real >
Array2D<Real> JAMA::LU< Real >::getU (  )  [inline]

Return upper triangular factor

戻り値:
U portion of LU factorization.

jama_lu.h187 行で定義されています。

参照先 JAMA::LU< Real >::LU_, と JAMA::LU< Real >::n.

template<class Real >
int JAMA::LU< Real >::isNonsingular (  )  [inline]

Is the matrix nonsingular?

戻り値:
1 (true) if upper triangular factor U (and hence A) is nonsingular, 0 otherwise.

jama_lu.h155 行で定義されています。

参照先 JAMA::LU< Real >::LU_, と JAMA::LU< Real >::n.

参照元 JAMA::LU< Real >::solve().

template<class Real >
Array1D<Real> JAMA::LU< Real >::permute_copy ( const Array1D< Real > &  A,
const Array1D< int > &  piv 
) [inline, private]

jama_lu.h53 行で定義されています。

参照先 TNT::Array1D< T >::dim().

template<class Real >
Array2D<Real> JAMA::LU< Real >::permute_copy ( const Array2D< Real > &  A,
const Array1D< int > &  piv,
int  j0,
int  j1 
) [inline, private]

jama_lu.h38 行で定義されています。

参照先 TNT::Array1D< T >::dim().

参照元 JAMA::LU< Real >::solve().

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

Solve A*x = b, where x and b are vectors of length equal to the number of rows in A.

引数:
b a vector (Array1D> of length equal to the first dimension of A.
戻り値:
x a vector (Array1D> so that L*U*x = b(piv), if B is nonconformant, returns 0x0 (null) array.

jama_lu.h281 行で定義されています。

参照先 TNT::Array1D< T >::dim1(), JAMA::LU< Real >::isNonsingular(), JAMA::LU< Real >::LU_, JAMA::LU< Real >::m, JAMA::LU< Real >::n, JAMA::LU< Real >::permute_copy(), と JAMA::LU< Real >::piv.

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

Solve A*X = B

引数:
B A Matrix with as many rows as A and any number of columns.
戻り値:
X so that L*U*X = B(piv,:), if B is nonconformant, returns 0x0 (null) array.

jama_lu.h231 行で定義されています。

参照先 TNT::Array2D< T >::dim1(), TNT::Array2D< T >::dim2(), JAMA::LU< Real >::isNonsingular(), JAMA::LU< Real >::LU_, JAMA::LU< Real >::m, JAMA::LU< Real >::n, JAMA::LU< Real >::permute_copy(), と JAMA::LU< Real >::piv.


変数

template<class Real >
Array2D<Real> JAMA::LU< Real >::LU_ [private]

template<class Real >
int JAMA::LU< Real >::m [private]

template<class Real >
int JAMA::LU< Real >::n [private]

template<class Real >
Array1D<int> JAMA::LU< Real >::piv [private]

jama_lu.h35 行で定義されています。

参照元 JAMA::LU< Real >::getPivot(), JAMA::LU< Real >::LU(), と JAMA::LU< Real >::solve().

template<class Real >
int JAMA::LU< Real >::pivsign [private]

jama_lu.h34 行で定義されています。

参照元 JAMA::LU< Real >::det(), と JAMA::LU< Real >::LU().


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

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