#include <OpenMS/COMPARISON/CLUSTERING/HierarchicalClustering.h>
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. | |
HierarchicalClustering & | operator= (const HierarchicalClustering &source) |
Assignment operator. | |
virtual | ~HierarchicalClustering () |
destructor | |
Acessors | |
const ClusterIdxVectorType & | getClusters () 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 |
typedef ClusterPoint ClusterPointType |
typedef std::vector<uint> ClusterIdxType |
typedef std::vector< ClusterIdxType > ClusterIdxVectorType |
typedef std::vector<double> DistanceLineType |
typedef std::vector< DistanceLineType > DistanceMatrixType |
enum LINKAGE_TYPE |
HierarchicalClustering | ( | ) | [inline] |
default constructor
HierarchicalClustering | ( | const HierarchicalClustering< ClusterPoint > & | source | ) | [inline] |
Copy constructor.
virtual ~HierarchicalClustering | ( | ) | [inline, virtual] |
destructor
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
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)
ClusterIdxVectorType clustermap_ [protected] |
result cluster map with indices to given feature map
Generated Tue Apr 1 15:36:43 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |