OpenMS
BinnedSpectrumCompareFunctor.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- 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 
14 
15 #include <cmath>
16 
17 namespace OpenMS
18 {
19 
30  class OPENMS_DLLAPI BinnedSpectrumCompareFunctor :
31  public DefaultParamHandler
32  {
33 
34 private:
35 
36 public:
39 
42 
45 
48 
50  virtual double operator()(const BinnedSpectrum& spec1, const BinnedSpectrum& spec2) const = 0;
51 
53  virtual double operator()(const BinnedSpectrum& spec) const = 0;
54 
56  static void registerChildren();
57 
59  static const String getProductName()
60  {
61  return "BinnedSpectrumCompareFunctor";
62  }
63 
64  };
65 
66 }
67 
Base class for compare functors of BinnedSpectra.
Definition: BinnedSpectrumCompareFunctor.h:32
BinnedSpectrumCompareFunctor()
default constructor
virtual double operator()(const BinnedSpectrum &spec) const =0
function call operator, calculates self similarity
virtual double operator()(const BinnedSpectrum &spec1, const BinnedSpectrum &spec2) const =0
function call operator, calculates the similarity of the given arguments
BinnedSpectrumCompareFunctor(const BinnedSpectrumCompareFunctor &source)
copy constructor
~BinnedSpectrumCompareFunctor() override
destructor
static void registerChildren()
registers all derived products
BinnedSpectrumCompareFunctor & operator=(const BinnedSpectrumCompareFunctor &source)
assignment operator
static const String getProductName()
get the identifier for a DefaultParamHandler
Definition: BinnedSpectrumCompareFunctor.h:59
This is a binned representation of a PeakSpectrum.
Definition: BinnedSpectrum.h:55
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22