Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vnl_matrix_inverse< T > Struct Template Reference

#include <vnl_matrix_inverse.h>

Inheritance diagram for vnl_matrix_inverse< T >:

vnl_svd< T > List of all members.

Detailed Description

template<class T>
struct vnl_matrix_inverse< T >

Calculates inverse of a matrix (wrapper around vnl_svd<double>).

vnl_matrix_inverse is a wrapper around vnl_svd<double> that allows you to write

  x = vnl_matrix_inverse<double>(A) * b;
This is exactly equivalent to
  x = vnl_svd<double>(A).solve(b);
but is arguably clearer, and also allows for the vnl_matrix_inverse class to be changed to use vnl_qr, say.

Definition at line 34 of file vnl_matrix_inverse.h.

Public Types

typedef vnl_numeric_traits<
T >::abs_t 
singval_t
 The singular values of a matrix of complex<T> are of type T, not complex<T>.

Public Member Functions

 vnl_matrix_inverse (vnl_matrix< T > const &M)
 ~vnl_matrix_inverse ()
 operator vnl_matrix () const
void zero_out_absolute (double tol=1e-8)
 find weights below threshold tol, zero them out, and update W_ and Winverse_.
void zero_out_relative (double tol=1e-8)
 find weights below tol*max(w) and zero them out.
int singularities () const
unsigned int rank () const
singval_t well_condition () const
singval_t determinant_magnitude () const
 Calculate determinant as product of diagonals in W.
singval_t norm () const
vnl_matrix< T > & U ()
 Return the matrix U.
vnl_matrix< T > const & U () const
 Return the matrix U.
U (int i, int j) const
 Return the matrix U's (i,j)th entry (to avoid svd.U()(i,j); ).
vnl_diag_matrix< singval_t > & W ()
 Get at DiagMatrix (q.v.
vnl_diag_matrix< singval_t
> const & 
W () const
 Get at DiagMatrix (q.v.
singval_tW (int i, int j)
singval_tW (int i)
vnl_diag_matrix< singval_t > & Winverse ()
vnl_diag_matrix< singval_t
> const & 
Winverse () const
singval_t sigma_max () const
singval_t sigma_min () const
vnl_matrix< T > & V ()
 Return the matrix V.
vnl_matrix< T > const & V () const
 Return the matrix V.
V (int i, int j) const
 Return the matrix V's (i,j)th entry (to avoid svd.V()(i,j); ).
vnl_matrix< T > inverse () const
vnl_matrix< T > pinverse (unsigned int rank=~0u) const
 pseudo-inverse (for non-square matrix) of desired rank.
vnl_matrix< T > tinverse (unsigned int rank=~0u) const
 Calculate inverse of transpose, using desired rank.
vnl_matrix< T > recompose (unsigned int rank=~0u) const
 Recompose SVD to U*W*V', using desired rank.
vnl_matrix< T > solve (vnl_matrix< T > const &B) const
 Solve the matrix equation M X = B, returning X.
vnl_vector< T > solve (vnl_vector< T > const &y) const
 Solve the matrix-vector system M x = y, returning x.
void solve (T const *rhs, T *lhs) const
void solve_preinverted (vnl_vector< T > const &rhs, vnl_vector< T > *out) const
 Solve the matrix-vector system M x = y.
vnl_matrix< T > nullspace () const
 Return N such that M * N = 0.
vnl_matrix< T > nullspace (int required_nullspace_dimension) const
 Return N such that M * N = 0.
vnl_matrix< T > left_nullspace () const
 Return N such that M' * N = 0.
vnl_matrix< T > left_nullspace (int required_nullspace_dimension) const
 Implementation to be done yet; currently returns left_nullspace(). - PVR.
vnl_vector< T > nullvector () const
 Return the rightmost column of V.
vnl_vector< T > left_nullvector () const
 Return the rightmost column of U.
bool valid () const


Member Typedef Documentation

template<class T>
typedef vnl_numeric_traits<T>::abs_t vnl_svd< T >::singval_t [inherited]
 

The singular values of a matrix of complex<T> are of type T, not complex<T>.

Definition at line 66 of file vnl_svd.h.


Constructor & Destructor Documentation

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

Definition at line 36 of file vnl_matrix_inverse.h.

template<class T>
vnl_matrix_inverse< T >::~vnl_matrix_inverse  )  [inline]
 

Definition at line 37 of file vnl_matrix_inverse.h.


Member Function Documentation

template<class T>
vnl_svd< T >::singval_t vnl_svd< T >::determinant_magnitude  )  const [inherited]
 

Calculate determinant as product of diagonals in W.

Definition at line 209 of file vnl_svd.txx.

template<class T>
vnl_matrix<T> vnl_svd< T >::inverse  )  const [inline, inherited]
 

Definition at line 132 of file vnl_svd.h.

template<class T>
vnl_matrix< T > vnl_svd< T >::left_nullspace int  required_nullspace_dimension  )  const [inherited]
 

Implementation to be done yet; currently returns left_nullspace(). - PVR.

Todo:
.

Definition at line 388 of file vnl_svd.txx.

template<class T>
vnl_matrix< T > vnl_svd< T >::left_nullspace  )  const [inherited]
 

Return N such that M' * N = 0.

Definition at line 378 of file vnl_svd.txx.

template<class T>
vnl_vector< T > vnl_svd< T >::left_nullvector  )  const [inherited]
 

Return the rightmost column of U.

Does not check to see whether or not the matrix actually was rank-deficient.

Definition at line 411 of file vnl_svd.txx.

template<class T>
vnl_svd< T >::singval_t vnl_svd< T >::norm  )  const [inherited]
 

Definition at line 222 of file vnl_svd.txx.

template<class T>
vnl_matrix< T > vnl_svd< T >::nullspace int  required_nullspace_dimension  )  const [inherited]
 

Return N such that M * N = 0.

Definition at line 370 of file vnl_svd.txx.

template<class T>
vnl_matrix< T > vnl_svd< T >::nullspace  )  const [inherited]
 

Return N such that M * N = 0.

Definition at line 359 of file vnl_svd.txx.

template<class T>
vnl_vector< T > vnl_svd< T >::nullvector  )  const [inherited]
 

Return the rightmost column of V.

Does not check to see whether or not the matrix actually was rank-deficient - the caller is assumed to have examined W and decided that to his or her satisfaction.

Definition at line 399 of file vnl_svd.txx.

template<class T>
vnl_matrix_inverse< T >::operator vnl_matrix  )  const [inline]
 

Definition at line 39 of file vnl_matrix_inverse.h.

template<class T>
vnl_matrix< T > vnl_svd< T >::pinverse unsigned int  rank = ~0u  )  const [inherited]
 

pseudo-inverse (for non-square matrix) of desired rank.

Definition at line 243 of file vnl_svd.txx.

template<class T>
unsigned int vnl_svd< T >::rank  )  const [inline, inherited]
 

Definition at line 94 of file vnl_svd.h.

template<class T>
vnl_matrix< T > vnl_svd< T >::recompose unsigned int  rank = ~0u  )  const [inherited]
 

Recompose SVD to U*W*V', using desired rank.

Definition at line 229 of file vnl_svd.txx.

template<class T>
singval_t vnl_svd< T >::sigma_max  )  const [inline, inherited]
 

Definition at line 119 of file vnl_svd.h.

template<class T>
singval_t vnl_svd< T >::sigma_min  )  const [inline, inherited]
 

Definition at line 120 of file vnl_svd.h.

template<class T>
int vnl_svd< T >::singularities  )  const [inline, inherited]
 

Definition at line 93 of file vnl_svd.h.

template<class T>
void vnl_svd< T >::solve T const *  rhs,
T *  lhs
const [inherited]
 

Definition at line 332 of file vnl_svd.txx.

template<class T>
vnl_vector< T > vnl_svd< T >::solve vnl_vector< T > const &  y  )  const [inherited]
 

Solve the matrix-vector system M x = y, returning x.

Definition at line 293 of file vnl_svd.txx.

template<class T>
vnl_matrix< T > vnl_svd< T >::solve vnl_matrix< T > const &  B  )  const [inherited]
 

Solve the matrix equation M X = B, returning X.

Definition at line 271 of file vnl_svd.txx.

template<class T>
void vnl_svd< T >::solve_preinverted vnl_vector< T > const &  rhs,
vnl_vector< T > *  out
const [inherited]
 

Solve the matrix-vector system M x = y.

Assuming that the singular values W have been preinverted by the caller.

Definition at line 340 of file vnl_svd.txx.

template<class T>
vnl_matrix< T > vnl_svd< T >::tinverse unsigned int  rank = ~0u  )  const [inherited]
 

Calculate inverse of transpose, using desired rank.

Definition at line 257 of file vnl_svd.txx.

template<class T>
T vnl_svd< T >::U int  i,
int  j
const [inline, inherited]
 

Return the matrix U's (i,j)th entry (to avoid svd.U()(i,j); ).

Definition at line 108 of file vnl_svd.h.

template<class T>
vnl_matrix<T> const& vnl_svd< T >::U  )  const [inline, inherited]
 

Return the matrix U.

Definition at line 105 of file vnl_svd.h.

template<class T>
vnl_matrix<T>& vnl_svd< T >::U  )  [inline, inherited]
 

Return the matrix U.

Definition at line 102 of file vnl_svd.h.

template<class T>
T vnl_svd< T >::V int  i,
int  j
const [inline, inherited]
 

Return the matrix V's (i,j)th entry (to avoid svd.V()(i,j); ).

Definition at line 129 of file vnl_svd.h.

template<class T>
vnl_matrix<T> const& vnl_svd< T >::V  )  const [inline, inherited]
 

Return the matrix V.

Definition at line 126 of file vnl_svd.h.

template<class T>
vnl_matrix<T>& vnl_svd< T >::V  )  [inline, inherited]
 

Return the matrix V.

Definition at line 123 of file vnl_svd.h.

template<class T>
bool vnl_svd< T >::valid  )  const [inline, inherited]
 

Definition at line 175 of file vnl_svd.h.

template<class T>
singval_t& vnl_svd< T >::W int  i  )  [inline, inherited]
 

Definition at line 118 of file vnl_svd.h.

template<class T>
singval_t& vnl_svd< T >::W int  i,
int  j
[inline, inherited]
 

Definition at line 117 of file vnl_svd.h.

template<class T>
vnl_diag_matrix<singval_t> const& vnl_svd< T >::W  )  const [inline, inherited]
 

Get at DiagMatrix (q.v.

) of singular values, sorted from largest to smallest.

Definition at line 114 of file vnl_svd.h.

template<class T>
vnl_diag_matrix<singval_t>& vnl_svd< T >::W  )  [inline, inherited]
 

Get at DiagMatrix (q.v.

) of singular values, sorted from largest to smallest.

Definition at line 111 of file vnl_svd.h.

template<class T>
singval_t vnl_svd< T >::well_condition  )  const [inline, inherited]
 

Definition at line 95 of file vnl_svd.h.

template<class T>
vnl_diag_matrix<singval_t> const& vnl_svd< T >::Winverse  )  const [inline, inherited]
 

Definition at line 116 of file vnl_svd.h.

template<class T>
vnl_diag_matrix<singval_t>& vnl_svd< T >::Winverse  )  [inline, inherited]
 

Definition at line 115 of file vnl_svd.h.

template<class T>
void vnl_svd< T >::zero_out_absolute double  tol = 1e-8  )  [inherited]
 

find weights below threshold tol, zero them out, and update W_ and Winverse_.

Definition at line 179 of file vnl_svd.txx.

template<class T>
void vnl_svd< T >::zero_out_relative double  tol = 1e-8  )  [inherited]
 

find weights below tol*max(w) and zero them out.

Definition at line 199 of file vnl_svd.txx.


The documentation for this struct was generated from the following file:
Generated on Thu Jan 10 14:37:39 2008 for core/vnl by  doxygen 1.4.4