#include <itkQRDecomposition.h>
QR decomposition A = Q R of a real or complex matrix, backed by Eigen.
Eigen-backed replacement for vnl_qr. The factors Q (orthonormal/unitary) and R (upper triangular) are computed once in the constructor via Eigen's HouseholderQR and stored as vnl matrices, so no Eigen type appears in the public interface. Q/R follow Eigen's sign convention; rely on the QR identities Q R == A and Q^* Q == I rather than on specific factor signs.
Definition at line 42 of file itkQRDecomposition.h.
Public Types | |
| using | MatrixType = vnl_matrix<T> |
| using | VectorType = vnl_vector<T> |
Public Member Functions | |
| T | GetDeterminant () const |
| const MatrixType & | GetQ () const |
| const MatrixType & | GetR () const |
| QRDecomposition (const MatrixType &A) | |
| VectorType | Solve (const VectorType &b) const |
Private Attributes | |
| T | m_Determinant {} |
| MatrixType | m_Q |
| MatrixType | m_R |
| bool | m_Square { false } |
| using itk::QRDecomposition< T >::MatrixType = vnl_matrix<T> |
Definition at line 45 of file itkQRDecomposition.h.
| using itk::QRDecomposition< T >::VectorType = vnl_vector<T> |
Definition at line 46 of file itkQRDecomposition.h.
|
inlineexplicit |
Definition at line 48 of file itkQRDecomposition.h.
References m_Determinant, m_Q, m_R, and m_Square.
|
inline |
Determinant of a square A (zero-initialized value for non-square A).
Definition at line 114 of file itkQRDecomposition.h.
References m_Determinant.
|
inline |
Orthonormal/unitary factor Q (rows x rows).
Definition at line 73 of file itkQRDecomposition.h.
References m_Q.
|
inline |
Upper-triangular factor R (rows x cols).
Definition at line 80 of file itkQRDecomposition.h.
References m_R.
|
inline |
Solve A x = b (least-squares for an overdetermined A) using x = R^-1 Q^* b. A must have full column rank; a rank-deficient R yields a non-finite x.
Definition at line 88 of file itkQRDecomposition.h.
|
private |
Definition at line 122 of file itkQRDecomposition.h.
Referenced by GetDeterminant(), and QRDecomposition().
|
private |
Definition at line 120 of file itkQRDecomposition.h.
Referenced by GetQ(), QRDecomposition(), and Solve().
|
private |
Definition at line 121 of file itkQRDecomposition.h.
Referenced by GetR(), QRDecomposition(), and Solve().
|
private |
Definition at line 123 of file itkQRDecomposition.h.
Referenced by QRDecomposition().