#include <LA_Lu_decomp.h>
Collaboration diagram for LA::LU:

Public Member Functions | |
| LU (const Matrix &M) | |
| Constructs the LU-decomposition of a the passed matrix. | |
| bool | singular () const |
| True if the matrix is singular. | |
| double | det () const |
| Returns the determinant of the matrix. | |
| Vector | solve (const Vector &b) const |
| Solves the equation Ax=b. | |
| Matrix | inverse () const |
| Calculates the inverse of the matrix. | |
Private Member Functions | |
| LU (const LU &lu) | |
| LU & | operator= (const LU &lu) |
| Vector | permute_copy (const Vector &A, const std::vector< int > &piv) const |
Private Attributes | |
| Matrix | LU_ |
| int | m |
| int | n |
| int | pivsign |
| std::vector< int > | piv |
Adapted from Template Numerical Toolkit (TNT) (http://math.nist.gov/tnt/)
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.
Definition at line 35 of file LA_Lu_decomp.h.
|
|
Constructs the LU-decomposition of a the passed matrix.
Definition at line 11 of file LA_Lu_decomp.cpp. |
|
|
Definition at line 45 of file LA_Lu_decomp.h. |
|
|
Definition at line 46 of file LA_Lu_decomp.h. |
|
|
True if the matrix is singular.
Definition at line 85 of file LA_Lu_decomp.cpp. References LU_. Referenced by solve(). |
|
|
Returns the determinant of the matrix.
Definition at line 95 of file LA_Lu_decomp.cpp. References LU_, m, and pivsign. Referenced by LA::Matrix::det(). |
|
|
Solves the equation Ax=b.
Definition at line 106 of file LA_Lu_decomp.cpp. References LA::Vector::dim(), LU_, m, permute_copy(), piv, and singular(). Referenced by inverse(), and LA::Matrix::solve(). |
Here is the call graph for this function:

|
|
Calculates the inverse of the matrix.
Definition at line 132 of file LA_Lu_decomp.cpp. References m, LA::Matrix::set_column(), and solve(). Referenced by LA::Matrix::invert(). |
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 146 of file LA_Lu_decomp.cpp. References LA::Vector::dim(). Referenced by solve(). |
Here is the call graph for this function:

|
|
Definition at line 78 of file LA_Lu_decomp.h. Referenced by det(), LU(), singular(), and solve(). |
|
|
Definition at line 79 of file LA_Lu_decomp.h. |
|
|
Definition at line 79 of file LA_Lu_decomp.h. |
|
|
Definition at line 80 of file LA_Lu_decomp.h. |
|
|
Definition at line 81 of file LA_Lu_decomp.h. |
1.3.6