OpenMS
ZhangSimilarityScore.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: $
7 // --------------------------------------------------------------------------
8 //
9 #pragma once
10 
12 
13 namespace OpenMS
14 {
15 
28  class OPENMS_DLLAPI ZhangSimilarityScore :
30  {
31 public:
32 
33  // @name Constructors and Destructors
34  // @{
37 
40 
43  // @}
44 
45  // @name Operators
46  // @{
49 
51  double operator()(const PeakSpectrum & spec1, const PeakSpectrum & spec2) const override;
52 
53  double operator()(const PeakSpectrum & spec) const override;
54  // @}
55 
56 protected:
57 
59  double getFactor_(double mz_tolerance, double mz_difference, bool is_gaussian = false) const;
60 
61 
62  };
63 
64 }
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
Base class for compare functors of spectra, that return a similarity value for two spectra.
Definition: PeakSpectrumCompareFunctor.h:28
Similarity score of Zhang.
Definition: ZhangSimilarityScore.h:30
double getFactor_(double mz_tolerance, double mz_difference, bool is_gaussian=false) const
returns the factor associated with the m/z tolerance and m/z difference of the peaks
~ZhangSimilarityScore() override
destructor
ZhangSimilarityScore()
default constructor
double operator()(const PeakSpectrum &spec1, const PeakSpectrum &spec2) const override
function call operator, calculates the similarity
double operator()(const PeakSpectrum &spec) const override
calculates self similarity
ZhangSimilarityScore(const ZhangSimilarityScore &source)
copy constructor
ZhangSimilarityScore & operator=(const ZhangSimilarityScore &source)
assignment operator
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19