Feel++  0.91.4
List of all members
Feel::SVD< MatrixA > Class Template Reference

Singular Value Decomposition of a rectangular matrix. More...

#include <svd.hpp>

Public Types

Typedefs
typedef MatrixA::value_type value_type
 
typedef MatrixA matrix_type
 
typedef
boost::numeric::ublas::vector
< value_type > 
vector_type
 

Public Member Functions

Constructors, destructor
 SVD (matrix_type const &__A)
 
 ~SVD ()
 
Accessors
matrix_type const & U () const
 
matrix_type const & V () const
 
vector_type const & S () const
 
value_type conditionNumber () const
 
void conditionNumber (value_type &__max, value_type &__min) const
 

Detailed Description

template<typename MatrixA>
class Feel::SVD< MatrixA >

Singular Value Decomposition of a rectangular matrix.

$ A = U * S * V^T $

where matrices $ U$ and $ V$ are orthogonal and Sig is a digonal matrix.

The singular value decomposition is performed by constructing an SVD object from an M*N matrix A with M>=N (that is, at least as many rows as columns). Note, in case M > N, matrix Sig has to be a M*N diagonal matrix. However, it has only N diag elements, which we store in a 1:N Vector sig.

Algorithm Bidiagonalization with Householder reflections followed by a modification of a QR-algorithm. For more details, see G.E. Forsythe, M.A. Malcolm, C.B. Moler Computer methods for mathematical computations. - Prentice-Hall, 1977 However, in the present implementation, matrices U and V are computed right away rather than delayed until after all Householder reflections.

Author
Christophe Prud'homme
See Also

Member Function Documentation

template<typename MatrixA>
value_type Feel::SVD< MatrixA >::conditionNumber ( ) const
inline

Computes $ C = \frac{\sigma^\mathrm{max}}{\sigma^\mathrm{min}} $ which represents the condition number of the matrix that was decomposed in singular values

Returns
$C$ the condition number of the matrix
template<typename MatrixA>
vector_type const& Feel::SVD< MatrixA >::S ( ) const
inline
Returns
S of the Singular Value Decomposition

Referenced by Feel::SOrth< MatrixA >::SOrth().

template<typename MatrixA>
matrix_type const& Feel::SVD< MatrixA >::U ( ) const
inline
Returns
U of the Singular Value Decomposition
template<typename MatrixA>
matrix_type const& Feel::SVD< MatrixA >::V ( ) const
inline
Returns
V of the Singular Value Decomposition