vnl_qr< T > Class Template Reference

#include <vnl_qr.h>

List of all members.


Detailed Description

template<class T>
class vnl_qr< T >

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.

Definition at line 36 of file 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.
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 > &)
void 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_

Constructor & Destructor Documentation

template<class T>
vnl_qr< T >::vnl_qr ( vnl_matrix< T > const &  M  )  [inline]

Definition at line 34 of file vnl_qr.txx.

template<class T>
vnl_qr< T >::~vnl_qr (  )  [inline]

Definition at line 63 of file vnl_qr.txx.

template<class T>
vnl_qr< T >::vnl_qr ( const vnl_qr< T > &   )  [inline, private]

Definition at line 77 of file vnl_qr.h.


Member Function Documentation

template<class T>
vnl_matrix< T > vnl_qr< T >::inverse (  )  const [inline]

return the inverse matrix of M.

Definition at line 248 of file vnl_qr.txx.

template<class T>
vnl_matrix< T > vnl_qr< T >::tinverse (  )  const [inline]

return the transpose of the inverse matrix of M.

Definition at line 267 of file vnl_qr.txx.

template<class T>
vnl_matrix< T > vnl_qr< T >::recompose (  )  const [inline]

return the original matrix M.

Definition at line 173 of file vnl_qr.txx.

template<class T>
vnl_matrix< T > vnl_qr< T >::solve ( const vnl_matrix< T > &  rhs  )  const [inline]

Solve equation M x = rhs for x using the computed decomposition.

Definition at line 286 of file vnl_qr.txx.

template<class T>
vnl_vector< T > vnl_qr< T >::solve ( const vnl_vector< T > &  rhs  )  const [inline]

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.

template<class T>
T vnl_qr< T >::determinant (  )  const [inline]

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.

template<class T>
vnl_matrix< T > const & vnl_qr< T >::Q (  )  const [inline]

Unpack and return unitary part Q.

Definition at line 88 of file vnl_qr.txx.

template<class T>
vnl_matrix< T > const & vnl_qr< T >::R (  )  const [inline]

Unpack and return R.

Definition at line 153 of file vnl_qr.txx.

template<class T>
vnl_vector< T > vnl_qr< T >::QtB ( const vnl_vector< T > &  b  )  const [inline]

Return residual vector d of M x = b -> d = Q'b.

Definition at line 217 of file vnl_qr.txx.

template<class T>
void vnl_qr< T >::extract_q_and_r ( vnl_matrix< T > *  q,
vnl_matrix< T > *  r 
) const [inline]

Definition at line 67 of file vnl_qr.h.

template<class T>
void vnl_qr< T >::operator= ( const vnl_qr< T > &   )  [inline, private]

Definition at line 78 of file vnl_qr.h.


Member Data Documentation

template<class T>
vnl_matrix<T> vnl_qr< T >::qrdc_out_ [private]

Definition at line 70 of file vnl_qr.h.

template<class T>
vnl_vector<T> vnl_qr< T >::qraux_ [private]

Definition at line 71 of file vnl_qr.h.

template<class T>
vnl_vector<long> vnl_qr< T >::jpvt_ [private]

Definition at line 72 of file vnl_qr.h.

template<class T>
vnl_matrix<T>* vnl_qr< T >::Q_ [private]

Definition at line 73 of file vnl_qr.h.

template<class T>
vnl_matrix<T>* vnl_qr< T >::R_ [private]

Definition at line 74 of file vnl_qr.h.


The documentation for this class was generated from the following files:

Generated on Sun Nov 22 06:17:26 2009 for core/vnl by  doxygen 1.5.5