#include <matrix_decomp.h>
Public Member Functions | |
QUDecomposition (const Matrix< C > &A) | |
default constructor, perform QU decomposition | |
bool | hasFullRank () const |
determine whether A has full rank | |
void | getU (UpperTriangularMatrix< C > &U) const |
return U | |
void | getQ (Matrix< C > &Q) const |
return Q | |
void | solve (const Vector< C > &b, Vector< C > &x) const |
void | inverse (Matrix< C > &AInv) const |
Protected Attributes | |
Matrix< C >::size_type | rowdim_ |
m = A.row_dimension(), n = A.column_dimension() | |
Matrix< C >::size_type | coldim_ |
Matrix< C > | QU_ |
storage for the decomposition | |
Vector< C > | Udiag_ |
storage for diag(U) |
QU decomposition, construct unitary Q and "upper triangular" U such that A = QU
References: JAMA Stoer, Numerische Mathematik I
A | arbitrary matrix |
void MathTL::QUDecomposition< C >::inverse | ( | Matrix< C > & | AInv | ) | const |
After the QU decomposition, compute the inverse of A.
void MathTL::QUDecomposition< C >::solve | ( | const Vector< C > & | b, |
Vector< C > & | x | ||
) | const |
After the QU decomposition, solve the linear system Ax = b, where we assume that b is in the range of A. The vector x will be resized properly