Blender V2.61 - r43446

JAMA::LU< Real > Class Template Reference

#include <jama_lu.h>

List of all members.

Public Member Functions

 LU (const Array2D< Real > &A)
int isNonsingular ()
Array2D< RealgetL ()
Array2D< RealgetU ()
Array1D< int > getPivot ()
Real det ()
Array2D< Realsolve (const Array2D< Real > &B)
Array1D< Realsolve (const Array1D< Real > &b)

Detailed Description

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.

Definition at line 30 of file jama_lu.h.


Constructor & Destructor Documentation

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

LU Decomposition

Parameters:
ARectangular matrix
Returns:
LU Decomposition object to access L, U and piv.

Definition at line 80 of file jama_lu.h.

References TNT::abs(), i, TNT::min(), and p.


Member Function Documentation

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

Compute determinant using LU factors.

Returns:
determinant of A, or 0 if A is not square.

Definition at line 217 of file jama_lu.h.

References simple_enum_gen::d.

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

Return lower triangular factor

Returns:
L

Definition at line 170 of file jama_lu.h.

References i.

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

Return pivot permutation vector

Returns:
piv

Definition at line 208 of file jama_lu.h.

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

Return upper triangular factor

Returns:
U portion of LU factorization.

Definition at line 190 of file jama_lu.h.

References i.

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

Is the matrix nonsingular?

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

Definition at line 158 of file jama_lu.h.

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.

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

Definition at line 284 of file jama_lu.h.

References TNT::Array1D< T >::dim1(), i, and isNonsingular().

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

Solve A*X = B

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

Definition at line 234 of file jama_lu.h.

References TNT::Array2D< T >::dim1(), TNT::Array2D< T >::dim2(), i, isNonsingular(), and X.


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