CompareFunctor for 2Dpoints. More...
#include <OpenMS/COMPARISON/CLUSTERING/EuclideanSimilarity.h>
Public Member Functions | |
| EuclideanSimilarity () | |
| default constructor More... | |
| EuclideanSimilarity (const EuclideanSimilarity &source) | |
| copy constructor More... | |
| virtual | ~EuclideanSimilarity () |
| destructor More... | |
| EuclideanSimilarity & | operator= (const EuclideanSimilarity &source) |
| assignment operator More... | |
| Real | operator() (const std::pair< Real, Real > &a, const std::pair< Real, Real > &b) const |
| calculates similarity between two points in euclidean space More... | |
| Real | operator() (const std::pair< Real, Real > &c) const |
| calculates self similarity, will yield 0 More... | |
| void | setScale (Real x) |
| clusters the indices according to their respective element distances More... | |
Private Attributes | |
| Real | scale_ |
CompareFunctor for 2Dpoints.
each 2D point as a pair of Real holds a Real coordinate for each Dimension
default constructor
| EuclideanSimilarity | ( | const EuclideanSimilarity & | source | ) |
copy constructor
|
virtual |
destructor
calculates similarity between two points in euclidean space
| 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]
calculates self similarity, will yield 0
| 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
| x | Real value to scale the result |
| 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)
|
private |
| OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:28 using doxygen 1.8.5 |