#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 |
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 Decomposition
A | Rectangular matrix |
参照先 JAMA::LU< Real >::LU_, JAMA::LU< Real >::m, JAMA::LU< Real >::n, JAMA::LU< Real >::piv, と JAMA::LU< Real >::pivsign.
Real JAMA::LU< Real >::det | ( | ) | [inline] |
Compute determinant using LU factors.
参照先 JAMA::LU< Real >::LU_, JAMA::LU< Real >::m, JAMA::LU< Real >::n, と JAMA::LU< Real >::pivsign.
Return lower triangular factor
参照先 JAMA::LU< Real >::LU_, JAMA::LU< Real >::m, と JAMA::LU< Real >::n.
Return upper triangular factor
int JAMA::LU< Real >::isNonsingular | ( | ) | [inline] |
Is the matrix nonsingular?
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. |
参照先 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.
Solve A*X = B
B | A Matrix with as many rows as A and any number of columns. |
参照先 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.