Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Member Functions | Static Public Member Functions

ClusterFunctor Class Reference
[Clustering]

Base class for cluster functors. More...

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

Inheritance diagram for ClusterFunctor:
AverageLinkage CompleteLinkage SingleLinkage

List of all members.

Classes

class  InsufficientInput
 Exception thrown if not enough data (<2) is used. More...

Public Member Functions

 ClusterFunctor ()
 default constructor
 ClusterFunctor (const ClusterFunctor &source)
 copy constructor
virtual ~ClusterFunctor ()
 destructor
ClusterFunctoroperator= (const ClusterFunctor &source)
 assignment operator
virtual void operator() (DistanceMatrix< Real > &original_distance, std::vector< BinaryTreeNode > &cluster_tree, const Real threshold=1) const =0
 abstract for clustering the indices according to their respective element distances

Static Public Member Functions

static void registerChildren ()
 registers all derived products

Detailed Description

Base class for cluster functors.

Each cluster functor employs a different method for stepwise merging clusters up to a given threshold, starting from the most elementary partition of data. Elements are represented by indices of a given distance matrix, which also should represent the order of input.


Constructor & Destructor Documentation

ClusterFunctor (  ) 

default constructor

ClusterFunctor ( const ClusterFunctor source  ) 

copy constructor

virtual ~ClusterFunctor (  )  [virtual]

destructor


Member Function Documentation

virtual void operator() ( DistanceMatrix< Real > &  original_distance,
std::vector< BinaryTreeNode > &  cluster_tree,
const Real  threshold = 1 
) const [pure virtual]

abstract for clustering the indices according to their respective element distances

Parameters:
original_distance DistanceMatrix<Real> containing the distances of the elements to be clustered, will be changed during clustering process, make sure to have a copy or be able to redo
cluster_tree vector< BinaryTreeNode >, represents the clustering, each node contains the next merged clusters (not element indices) and their distance, strict order is kept: left_child < right_child,
threshold Real value, the minimal distance from which on cluster merging is considered unrealistic. By default set to 1, i.e. complete clustering until only one cluster remains

original_distance is considered mirrored at the main diagonal, so only entrys up the main diagonal are used. The threshold can be taken from the maximal distance of two elements considered related and adapted in a way corresponding to the employed clustering method. The results are represented by cluster_tree, to get the actual clustering (with element indices) from a certain step of the clustering

See also:
BinaryTreeNode , ClusterAnalyzer::cut
ClusterFunctor& operator= ( const ClusterFunctor source  ) 

assignment operator

static void registerChildren (  )  [static]

registers all derived products


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:50 using doxygen 1.7.1