OpenMS
EuclideanSimilarity.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Mathias Walzer $
6 // $Authors: $
7 // --------------------------------------------------------------------------
8 //
9 #pragma once
10 
11 #include <cmath>
13 
14 namespace OpenMS
15 {
16 
24  class OPENMS_DLLAPI EuclideanSimilarity
25  {
26 private:
27 
28  float scale_;
29 
30 public:
31 
34 
37 
40 
43 
44 
53  float operator()(const std::pair<float, float> & a, const std::pair<float, float> & b) const;
54 
61  float operator()(const std::pair<float, float> & c) const;
62 
71  void setScale(float x);
72 
73  };
74 
75 }
CompareFunctor for 2Dpoints.
Definition: EuclideanSimilarity.h:25
float scale_
Definition: EuclideanSimilarity.h:28
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: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19