OpenMS
Loading...
Searching...
No Matches
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
14namespace OpenMS
15{
16
24 class OPENMS_DLLAPI EuclideanSimilarity
25 {
26private:
27
28 float scale_;
29
30public:
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
EuclideanSimilarity & operator=(const EuclideanSimilarity &source)
assignment operator
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(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
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19