CEDRIC  Revision_backup-2009-02
Public Types | Public Member Functions | List of all members
CMDS< ValueType > Class Template Reference

Classical Multidimensional Scaling (suited for small instances) More...

#include <CMDS.h>

Public Types

enum  DecompositionMethod { MethodQR, MethodCholesky, MethodLanczos }
 
typedef ublas::matrix< ValueType > Matrix
 
typedef ublas::vector< ValueType > Vector
 

Public Member Functions

 CMDS (Matrix &D, int method=(int) MethodQR)
 Perform classical multidimensional scaling. More...
 
const Vector & getEigenvalues () const
 
void project (int dim=2)
 Project referenced matrix D to dim dimensions. More...
 

Detailed Description

template<class ValueType>
class CMDS< ValueType >

Classical Multidimensional Scaling (suited for small instances)

Member Typedef Documentation

template<class ValueType>
typedef ublas::matrix<ValueType> CMDS< ValueType >::Matrix
template<class ValueType>
typedef ublas::vector<ValueType> CMDS< ValueType >::Vector

Member Enumeration Documentation

template<class ValueType>
enum CMDS::DecompositionMethod
Enumerator
MethodQR 

complete eigendecomposition (infeasible for lager instances)

MethodCholesky 

default method

MethodLanczos 

if IETL is not available MethodCholesky is used instead

Constructor & Destructor Documentation

template<class ValueType>
CMDS< ValueType >::CMDS ( Matrix &  D,
int  method = (int)MethodQR 
)
inline

Perform classical multidimensional scaling.

Parameters
[in,out]Ddistance matrix, gets overwritten after CMDS!
Note
Input matrix will be destroyed!
As decomposition method one should choose MethodLanczos for larger matrices (requires IETL library!)

References ublasTools::double_center(), Cholesky< ValueType >::getL(), Eigenvalue< ValueType >::getRealEigenvalues(), Eigenvalue< ValueType >::getV(), CMDS< ValueType >::MethodCholesky, and CMDS< ValueType >::MethodLanczos.

Member Function Documentation

template<class ValueType>
const Vector& CMDS< ValueType >::getEigenvalues ( ) const
inline

Return real eigenvalues sorted from largest to smallest (empty when using Cholesky method!).

Returns
real eigenvalues sorted from largest to smallest
template<class ValueType>
void CMDS< ValueType >::project ( int  dim = 2)
inline