JAMA::QR< Real > Class Template Reference
#include <jama_qr.h>
List of all members.
Detailed Description
template<class Real>
class JAMA::QR< Real >
Classical
QR Decompisition: for an m-by-n matrix A with m >= n, the
QR decomposition is an m-by-n orthogonal matrix Q and an n-by-n upper triangular matrix R so that A = Q*R.
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 35 of file jama_qr.h.
Constructor & Destructor Documentation
Create a QR factorization object for A.
- Parameters:
-
| A | rectangular (m>=n) matrix. |
Definition at line 63 of file jama_qr.h.
Member Function Documentation
Retreive the Householder vectors from QR factorization
- Returns:
- lower trapezoidal matrix whose columns define the reflections
Definition at line 130 of file jama_qr.h.
Generate and return the (economy-sized) orthogonal factor
- Parameters:
-
| Q | the (ecnomy-sized) orthogonal factor (Q*R=A). |
Definition at line 183 of file jama_qr.h.
Return the upper triangular factor, R, of the QR factorization
- Returns:
- R
Definition at line 157 of file jama_qr.h.
template<class Real>
int JAMA::QR< Real >::isFullRank |
( |
|
) |
const [inline] |
Flag to denote the matrix is of full rank.
- Returns:
- 1 if matrix is full rank, 0 otherwise.
Definition at line 111 of file jama_qr.h.
Least squares solution of A*X = B
- Parameters:
-
| B | m x k Array (must conform). |
- Returns:
- X n x k Array that minimizes the two norm of Q*R*X-B. If B is non-conformant, or if QR.isFullRank() is false, the routine returns a null (0x0) array.
Definition at line 268 of file jama_qr.h.
Least squares solution of A*x = b
- Parameters:
-
| B | m-length array (vector). |
- Returns:
- x n-length array (vector) that minimizes the two norm of Q*R*X-B. If B is non-conformant, or if QR.isFullRank() is false, the routine returns a null (0-length) vector.
Definition at line 217 of file jama_qr.h.
Member Data Documentation
Row and column dimensions. column dimension. row dimension.
Definition at line 48 of file jama_qr.h.
Array for internal storage of decomposition. internal array storage.
Definition at line 42 of file jama_qr.h.
Array for internal storage of diagonal of R. diagonal of R.
Definition at line 53 of file jama_qr.h.
The documentation for this class was generated from the following file:
- /Users/brown170/Projects/Current/coral_msu_repo/trunk/src/coralutils/ThirdPartyPackages/JAMA/jama_qr.h