aimsalgo  5.1.2
Neuroimaging image processing
AimsSVD< T > Class Template Reference

#include <aims/math/svd.h>

Public Types

enum  SVDReturnType { MatrixOfSingularValues , VectorOfSingularValues }
 

Public Member Functions

 AimsSVD (SVDReturnType rt=MatrixOfSingularValues)
 Constructor and destructor. More...
 
virtual ~AimsSVD ()
 destructor More...
 
void setReturnType (SVDReturnType rt)
 
carto::VolumeRef< T > doit (carto::VolumeRef< T > &, carto::VolumeRef< T > *v=NULL)
 Singular Value Decomposition. More...
 
void sort (carto::VolumeRef< T > &, carto::VolumeRef< T > &, carto::VolumeRef< T > *v=NULL)
 sort the U and V matrices and the W vector in decreasing order More...
 
carto::VolumeRef< T > backwardSubstitution (const carto::VolumeRef< T > &U, const carto::VolumeRef< T > &W, const carto::VolumeRef< T > &V, const carto::VolumeRef< T > &S)
 

Detailed Description

template<class T>
class AimsSVD< T >

Definition at line 58 of file svd.h.

Member Enumeration Documentation

◆ SVDReturnType

template<class T >
enum AimsSVD::SVDReturnType
Enumerator
MatrixOfSingularValues 
VectorOfSingularValues 

Definition at line 62 of file svd.h.

Constructor & Destructor Documentation

◆ AimsSVD()

template<class T >
AimsSVD< T >::AimsSVD ( SVDReturnType  rt = MatrixOfSingularValues)
inline

Constructor and destructor.

constructor

Definition at line 71 of file svd.h.

◆ ~AimsSVD()

template<class T >
virtual AimsSVD< T >::~AimsSVD ( )
inlinevirtual

destructor

Definition at line 73 of file svd.h.

Member Function Documentation

◆ backwardSubstitution()

template<class T >
carto::VolumeRef< T > AimsSVD< T >::backwardSubstitution ( const carto::VolumeRef< T > &  U,
const carto::VolumeRef< T > &  W,
const carto::VolumeRef< T > &  V,
const carto::VolumeRef< T > &  S 
)

◆ doit()

template<class T >
carto::VolumeRef< T > AimsSVD< T >::doit ( carto::VolumeRef< T > &  ,
carto::VolumeRef< T > *  v = NULL 
)

Singular Value Decomposition.

\ This function is adapted from the Numerical Recipes in C. \ Returns the diagonal matrix of singular values W of the input matrix if the SVDReturnType is set to MatrixOfSingularValues or a vector of singular values if set to VectorOfSingularValues. \ The first parameter is the input matrix. On output, it is replaced by the (m*n) matrix U. \

Parameters
vis output as the (n*n) matrix V (and not its transpose!).

Referenced by aims::DiscriminantAnalysisElement::doIt(), AimsPCA::doIt(), aims::ProbabilisticPcaElement::doIt(), aims::PpcaAnalyserElement::newStep2(), and aims::ProbabilisticPcaElement::noiseVariance().

◆ setReturnType()

template<class T >
void AimsSVD< T >::setReturnType ( SVDReturnType  rt)
inline

◆ sort()

template<class T >
void AimsSVD< T >::sort ( carto::VolumeRef< T > &  ,
carto::VolumeRef< T > &  ,
carto::VolumeRef< T > *  v = NULL 
)

sort the U and V matrices and the W vector in decreasing order

Referenced by AimsPCA::doIt(), aims::ProbabilisticPcaElement::doIt(), aims::PpcaAnalyserElement::newStep2(), and aims::ProbabilisticPcaElement::noiseVariance().


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