Public Member Functions | Protected Attributes

SVD< MatrixType > Class Template Reference

Standard SVD decomposition of a matrix and associated features. More...

#include <SVD.h>

List of all members.

Public Member Functions

 SVD ()
 SVD (const MatrixType &matrix)
template<typename OtherDerived , typename ResultType >
bool solve (const MatrixBase< OtherDerived > &b, ResultType *result) const
const MatrixUTypematrixU () const
const SingularValuesTypesingularValues () const
const MatrixVTypematrixV () const
void compute (const MatrixType &matrix)
SVDsort ()
template<typename UnitaryType , typename PositiveType >
void computeUnitaryPositive (UnitaryType *unitary, PositiveType *positive) const
template<typename PositiveType , typename UnitaryType >
void computePositiveUnitary (PositiveType *positive, UnitaryType *unitary) const
template<typename RotationType , typename ScalingType >
void computeRotationScaling (RotationType *unitary, ScalingType *positive) const
template<typename ScalingType , typename RotationType >
void computeScalingRotation (ScalingType *positive, RotationType *unitary) const
template<typename UnitaryType , typename PositiveType >
void computePositiveUnitary (UnitaryType *positive, PositiveType *unitary) const

Protected Attributes

MatrixUType m_matU
MatrixVType m_matV
SingularValuesType m_sigma

Detailed Description

template<typename MatrixType>
class SVD< MatrixType >

Standard SVD decomposition of a matrix and associated features.

Parameters:
MatrixType the type of the matrix of which we are computing the SVD decomposition

This class performs a standard SVD decomposition of a real matrix A of size M x N with M >= N.

See also:
MatrixBase::SVD()

Constructor & Destructor Documentation

template<typename MatrixType>
SVD< MatrixType >::SVD (  )  [inline]
template<typename MatrixType>
SVD< MatrixType >::SVD ( const MatrixType &  matrix  )  [inline]

Member Function Documentation

template<typename MatrixType >
void SVD< MatrixType >::compute ( const MatrixType &  matrix  ) 

Computes / recomputes the SVD decomposition A = U S V^* of matrix

Note:
this code has been adapted from JAMA (public domain)
template<typename MatrixType>
template<typename PositiveType , typename UnitaryType >
void SVD< MatrixType >::computePositiveUnitary ( PositiveType *  positive,
UnitaryType *  unitary 
) const
template<typename MatrixType>
template<typename UnitaryType , typename PositiveType >
void SVD< MatrixType >::computePositiveUnitary ( UnitaryType *  positive,
PositiveType *  unitary 
) const

Computes the polar decomposition of the matrix, as a product positive x unitary.

If either pointer is zero, the corresponding computation is skipped.

Only for square matrices.

See also:
computeUnitaryPositive(), computeRotationScaling()
template<typename MatrixType >
template<typename RotationType , typename ScalingType >
void SVD< MatrixType >::computeRotationScaling ( RotationType *  rotation,
ScalingType *  scaling 
) const

decomposes the matrix as a product rotation x scaling, the scaling being not necessarily positive.

If either pointer is zero, the corresponding computation is skipped.

This method requires the Geometry module.

See also:
computeScalingRotation(), computeUnitaryPositive()
template<typename MatrixType >
template<typename ScalingType , typename RotationType >
void SVD< MatrixType >::computeScalingRotation ( ScalingType *  scaling,
RotationType *  rotation 
) const

decomposes the matrix as a product scaling x rotation, the scaling being not necessarily positive.

If either pointer is zero, the corresponding computation is skipped.

This method requires the Geometry module.

See also:
computeRotationScaling(), computeUnitaryPositive()
template<typename MatrixType >
template<typename UnitaryType , typename PositiveType >
void SVD< MatrixType >::computeUnitaryPositive ( UnitaryType *  unitary,
PositiveType *  positive 
) const

Computes the polar decomposition of the matrix, as a product unitary x positive.

If either pointer is zero, the corresponding computation is skipped.

Only for square matrices.

See also:
computePositiveUnitary(), computeRotationScaling()
template<typename MatrixType>
const MatrixUType& SVD< MatrixType >::matrixU (  )  const [inline]
template<typename MatrixType>
const MatrixVType& SVD< MatrixType >::matrixV (  )  const [inline]
template<typename MatrixType>
const SingularValuesType& SVD< MatrixType >::singularValues (  )  const [inline]
template<typename MatrixType >
template<typename OtherDerived , typename ResultType >
bool SVD< MatrixType >::solve ( const MatrixBase< OtherDerived > &  b,
ResultType *  result 
) const
Returns:
the solution of $ A x = b $ using the current SVD decomposition of A. The parts of the solution corresponding to zero singular values are ignored.
See also:
MatrixBase::svd(), LU::solve(), LLT::solve()
template<typename MatrixType >
SVD< MatrixType > & SVD< MatrixType >::sort (  ) 

Member Data Documentation

template<typename MatrixType>
MatrixUType SVD< MatrixType >::m_matU [protected]
template<typename MatrixType>
MatrixVType SVD< MatrixType >::m_matV [protected]
template<typename MatrixType>
SingularValuesType SVD< MatrixType >::m_sigma [protected]

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