Extract the Q*R decomposition of matrix M. More...
#include <vnl_qr.h>
Public Member Functions | |
vnl_qr (vnl_matrix< T > const &M) | |
~vnl_qr () | |
vnl_matrix< T > | inverse () const |
return the inverse matrix of M. | |
vnl_matrix< T > | tinverse () const |
return the transpose of the inverse matrix of M. | |
vnl_matrix< T > | recompose () const |
return the original matrix M. | |
vnl_matrix< T > | solve (const vnl_matrix< T > &rhs) const |
Solve equation M x = rhs for x using the computed decomposition. | |
vnl_vector< T > | solve (const vnl_vector< T > &rhs) const |
Solve equation M x = rhs for x using the computed decomposition. | |
T | determinant () const |
Return the determinant of M. This is computed from M = Q R as follows:. | |
vnl_matrix< T > const & | Q () const |
Unpack and return unitary part Q. | |
vnl_matrix< T > const & | R () const |
Unpack and return R. | |
vnl_vector< T > | QtB (const vnl_vector< T > &b) const |
Return residual vector d of M x = b -> d = Q'b. | |
void | extract_q_and_r (vnl_matrix< T > *q, vnl_matrix< T > *r) const |
Private Member Functions | |
vnl_qr (const vnl_qr< T > &) | |
vnl_qr< T > & | operator= (const vnl_qr< T > &) |
Private Attributes | |
vnl_matrix< T > | qrdc_out_ |
vnl_vector< T > | qraux_ |
vnl_vector< long > | jpvt_ |
vnl_matrix< T > * | Q_ |
vnl_matrix< T > * | R_ |
Extract the Q*R decomposition of matrix M.
The decomposition is stored in a compact and time-efficient packed form, which is most easily used via the "solve" and "determinant" methods.
vnl_qr< T >::vnl_qr | ( | vnl_matrix< T > const & | M | ) |
Definition at line 34 of file vnl_qr.txx.
Definition at line 63 of file vnl_qr.txx.
T vnl_qr< T >::determinant | ( | ) | const |
Return the determinant of M. This is computed from M = Q R as follows:.
|M| = |Q| |R|. |R| is the product of the diagonal elements. |Q| is (-1)^n as it is a product of Householder reflections. So det = -prod(-r_ii).
|M| = |Q| |R| |R| is the product of the diagonal elements. |Q| is (-1)^n as it is a product of Householder reflections. So det = -prod(-r_ii).
Definition at line 75 of file vnl_qr.txx.
void vnl_qr< T >::extract_q_and_r | ( | vnl_matrix< T > * | q, |
vnl_matrix< T > * | r | ||
) | const [inline] |
vnl_matrix< T > vnl_qr< T >::inverse | ( | ) | const |
return the inverse matrix of M.
Definition at line 248 of file vnl_qr.txx.
vnl_matrix< T > const & vnl_qr< T >::Q | ( | ) | const |
Unpack and return unitary part Q.
Definition at line 88 of file vnl_qr.txx.
vnl_vector< T > vnl_qr< T >::QtB | ( | const vnl_vector< T > & | b | ) | const |
Return residual vector d of M x = b -> d = Q'b.
Definition at line 217 of file vnl_qr.txx.
vnl_matrix< T > const & vnl_qr< T >::R | ( | ) | const |
Unpack and return R.
Definition at line 153 of file vnl_qr.txx.
vnl_matrix< T > vnl_qr< T >::recompose | ( | ) | const |
return the original matrix M.
Definition at line 173 of file vnl_qr.txx.
vnl_matrix< T > vnl_qr< T >::solve | ( | const vnl_matrix< T > & | rhs | ) | const |
Solve equation M x = rhs for x using the computed decomposition.
Definition at line 286 of file vnl_qr.txx.
vnl_vector< T > vnl_qr< T >::solve | ( | const vnl_vector< T > & | rhs | ) | const |
Solve equation M x = rhs for x using the computed decomposition.
Solve equation M x = b for x using the computed decomposition.
Definition at line 186 of file vnl_qr.txx.
vnl_matrix< T > vnl_qr< T >::tinverse | ( | ) | const |
return the transpose of the inverse matrix of M.
Definition at line 267 of file vnl_qr.txx.
vnl_vector<long> vnl_qr< T >::jpvt_ [private] |
vnl_matrix<T>* vnl_qr< T >::Q_ [mutable, private] |
vnl_vector<T> vnl_qr< T >::qraux_ [private] |
vnl_matrix<T> vnl_qr< T >::qrdc_out_ [private] |
vnl_matrix<T>* vnl_qr< T >::R_ [mutable, private] |