OpenMS
EuclideanSimilarity.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Mathias Walzer$
6 // $Authors:$
7 // --------------------------------------------------------------------------
8 //
9 #pragma once
10
11 #include <cmath>
13
14 namespace OpenMS
15 {
16
25  class OPENMS_DLLAPI EuclideanSimilarity
26  {
27 private:
28
29  float scale_;
30
31 public:
32
35
38
41
44
45
54  float operator()(const std::pair<float, float> & a, const std::pair<float, float> & b) const;
55
62  float operator()(const std::pair<float, float> & c) const;
63
72  void setScale(float x);
73
74  };
75
76 }
CompareFunctor for 2Dpoints.
Definition: EuclideanSimilarity.h:26
float scale_
Definition: EuclideanSimilarity.h:29
float operator()(const std::pair< float, float > &a, const std::pair< float, float > &b) const
calculates similarity between two points in euclidean space
virtual ~EuclideanSimilarity()
destructor
EuclideanSimilarity & operator=(const EuclideanSimilarity &source)
assignment operator
EuclideanSimilarity(const EuclideanSimilarity &source)
copy constructor
EuclideanSimilarity()
default constructor
void setScale(float x)
clusters the indices according to their respective element distances
float operator()(const std::pair< float, float > &c) const
calculates self similarity, will yield 0
const double c
Definition: Constants.h:188
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22