Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

HierarchicalClustering Class Template Reference

#include <OpenMS/COMPARISON/CLUSTERING/HierarchicalClustering.h>

Inheritance diagram for HierarchicalClustering:

DefaultParamHandler

List of all members.


Detailed Description

template<typename ClusterPoint = DPosition<2>>
class OpenMS::HierarchicalClustering< ClusterPoint >

Complete or single linkage clustering based on DPosition<>.

General clustering in arbitrary dimensions using euclidean distance up until a certain cutoff, i.e. the maximal allowed distance for merging two clusters.

The result is an STL vector of vectors. Each inner vector respresents one cluster, holding the indices of the input elements.

HierarchicalClustering Parameters are explained on a separate page.

Public Types

enum  LINKAGE_TYPE { COMPLETE_LINKAGE = 0, SINGLE_LINKAGE }
 clustering method More...
typedef ClusterPoint ClusterPointType
typedef std::vector< uint > ClusterIdxType
typedef std::vector
< ClusterIdxType
ClusterIdxVectorType
typedef std::vector< double > DistanceLineType
typedef std::vector
< DistanceLineType
DistanceMatrixType

Public Member Functions

void compute (const std::vector< ClusterPointType > &points) throw (Exception::NotImplemented)
 compute clusters from a vector of DPositions up until given cutoff
void printStatistics (std::ostream &os)
Constructors and Destructors
 HierarchicalClustering ()
 default constructor
 HierarchicalClustering (const HierarchicalClustering &source)
 Copy constructor.
HierarchicalClusteringoperator= (const HierarchicalClustering &source)
 Assignment operator.
virtual ~HierarchicalClustering ()
 destructor
Acessors
const ClusterIdxVectorTypegetClusters () const
 retrieve computed zero-charge feature map

Protected Member Functions

void getMinDistance_ (const DistanceMatrixType &distanceMatrix, double &minDistance, uint &minRow, uint &minColumn)
double getDistance_ (const ClusterPointType &a, const ClusterPointType &b)
 compute euclidean distance between two points
void linkageComplete_ (DistanceMatrixType &distanceMatrix, const uint &minRow, const uint &minColumn)
void linkageSingle_ (DistanceMatrixType &distanceMatrix, const uint &minRow, const uint &minColumn)

Protected Attributes

ClusterIdxVectorType clustermap_
 result cluster map with indices to given feature map


Member Typedef Documentation

typedef ClusterPoint ClusterPointType

typedef std::vector<uint> ClusterIdxType

typedef std::vector< ClusterIdxType > ClusterIdxVectorType

typedef std::vector<double> DistanceLineType

typedef std::vector< DistanceLineType > DistanceMatrixType


Member Enumeration Documentation

enum LINKAGE_TYPE

clustering method

Enumerator:
COMPLETE_LINKAGE 
SINGLE_LINKAGE 


Constructor & Destructor Documentation

HierarchicalClustering (  )  [inline]

default constructor

HierarchicalClustering ( const HierarchicalClustering< ClusterPoint > &  source  )  [inline]

Copy constructor.

virtual ~HierarchicalClustering (  )  [inline, virtual]

destructor


Member Function Documentation

HierarchicalClustering& operator= ( const HierarchicalClustering< ClusterPoint > &  source  )  [inline]

Assignment operator.

const ClusterIdxVectorType& getClusters (  )  const [inline]

retrieve computed zero-charge feature map

void compute ( const std::vector< ClusterPointType > &  points  )  throw (Exception::NotImplemented) [inline]

compute clusters from a vector of DPositions up until given cutoff

void printStatistics ( std::ostream &  os  )  [inline]

void getMinDistance_ ( const DistanceMatrixType distanceMatrix,
double &  minDistance,
uint &  minRow,
uint &  minColumn 
) [inline, protected]

find entry in distance matrix with MINIMAL value and return value and position

Note:
minRow will always be greater than minColumn

double getDistance_ ( const ClusterPointType a,
const ClusterPointType b 
) [inline, protected]

compute euclidean distance between two points

void linkageComplete_ ( DistanceMatrixType distanceMatrix,
const uint &  minRow,
const uint &  minColumn 
) [inline, protected]

complete linkage clustering we combine clusters minrow and mincolumn (minrow is the new cluster index)

void linkageSingle_ ( DistanceMatrixType distanceMatrix,
const uint &  minRow,
const uint &  minColumn 
) [inline, protected]

single linkage clustering we combine clusters minrow and mincolumn (minrow is the new cluster index)


Member Data Documentation

ClusterIdxVectorType clustermap_ [protected]

result cluster map with indices to given feature map


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:43 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1