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

EuclideanSimilarity Class Reference

CompareFunctor for 2Dpoints. More...

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

List of all members.

Public Member Functions

 EuclideanSimilarity ()
 default constructor
 EuclideanSimilarity (const EuclideanSimilarity &source)
 copy constructor
virtual ~EuclideanSimilarity ()
 destructor
EuclideanSimilarityoperator= (const EuclideanSimilarity &source)
 assignment operator
Real operator() (const std::pair< Real, Real > &a, const std::pair< Real, Real > &b) const
 calculates similarity between two points in euclidean space
Real operator() (const std::pair< Real, Real > &c) const
 calculates self similarity, will yield 0
void setScale (Real x)
 clusters the indices according to their respective element distances

Private Attributes

Real scale_

Detailed Description

CompareFunctor for 2Dpoints.

each 2D point as a pair of Real holds a Real coordinate for each Dimension


Constructor & Destructor Documentation

default constructor

EuclideanSimilarity ( const EuclideanSimilarity source  ) 

copy constructor

virtual ~EuclideanSimilarity (  )  [virtual]

destructor


Member Function Documentation

Real operator() ( const std::pair< Real, Real > &  a,
const std::pair< Real, Real > &  b 
) const

calculates similarity between two points in euclidean space

Parameters:
a a pair of Real, giving the x and the y coordinates of the first point
b a pair of Real, giving the x and the y coordinates of the second point

calculates similarity from the euclidean distance between given 2D points, scaled in [0,1]

See also:
setScale
Real operator() ( const std::pair< Real, Real > &  c  )  const

calculates self similarity, will yield 0

Parameters:
c a pair of Real, giving the x and the y coordinates
EuclideanSimilarity& operator= ( const EuclideanSimilarity source  ) 

assignment operator

void setScale ( Real  x  ) 

clusters the indices according to their respective element distances

Parameters:
x Real value to scale the result
Exceptions:
Exception::DivisionByZero if scaling is unapplicable because it is 0

sets the scale so that similarities can be correctly calculated from distances. Should be set so that the greatest distance in a chosen set will be scales to 1 (i.e. x = greatest possible distance in the set)


Member Data Documentation

Real scale_ [private]

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