#include <LA_Qr_decomp.h>
Collaboration diagram for LA::QR:

Public Member Functions | |
| QR (const Matrix &A) | |
| Create a QR factorization object for A. | |
| bool | isFullRank () const |
| Flag to denote the matrix is of full rank. | |
| Matrix | getHouseholder () const |
| Retreive the Householder vectors from QR factorization. | |
| Matrix | getR () const |
| Return the upper triangular factor, R, of the QR factorization. | |
| Matrix | getQ () const |
| Generate and return the (economy-sized) orthogonal factor. | |
| Vector | solve (const Vector &b) const |
| Least squares solution of A*x = b. | |
Private Attributes | |
| Matrix | QR_ |
| int | m |
| int | n |
| Vector | Rdiag |
The QR decompostion always exists, even if the matrix does not have full rank, so the constructor will never fail. The primary use of the QR decomposition is in the least squares solution of nonsquare systems of simultaneous linear equations. This will fail if isFullRank() returns 0 (false).
The Q and R factors can be retrived via the getQ() and getR() methods. Furthermore, a solve() method is provided to find the least squares solution of Ax=b using the QR factors.
(Adapted from JAMA, a Java Matrix Library, developed by jointly by the Mathworks and NIST; see http://math.nist.gov/javanumerics/jama).
Definition at line 41 of file LA_Qr_decomp.h.
|
|
Create a QR factorization object for A.
Definition at line 9 of file LA_Qr_decomp.cpp. References LA::Vector::create(), QR_, and Rdiag. |
Here is the call graph for this function:

|
|
Flag to denote the matrix is of full rank.
Definition at line 59 of file LA_Qr_decomp.cpp. References Rdiag. Referenced by solve(). |
|
|
Retreive the Householder vectors from QR factorization.
Definition at line 69 of file LA_Qr_decomp.cpp. References QR_. |
|
|
Return the upper triangular factor, R, of the QR factorization.
Definition at line 90 of file LA_Qr_decomp.cpp. |
|
|
Generate and return the (economy-sized) orthogonal factor.
Definition at line 114 of file LA_Qr_decomp.cpp. References QR_. |
|
|
Least squares solution of A*x = b.
Definition at line 146 of file LA_Qr_decomp.cpp. References LA::Vector::dim(), isFullRank(), QR_, and Rdiag. |
Here is the call graph for this function:

|
|
Definition at line 84 of file LA_Qr_decomp.h. Referenced by getHouseholder(), getQ(), getR(), QR(), and solve(). |
|
|
Definition at line 85 of file LA_Qr_decomp.h. |
|
|
Definition at line 86 of file LA_Qr_decomp.h. |
|
|
Definition at line 87 of file LA_Qr_decomp.h. Referenced by getR(), isFullRank(), QR(), and solve(). |
1.3.6