OpenMS
SpectrumPrecursorComparator.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: Timo Sachsenberg $
6 // $Authors: $
7 // --------------------------------------------------------------------------
8 //
9 #pragma once
10 
12 
13 namespace OpenMS
14 {
15 
23  class OPENMS_DLLAPI SpectrumPrecursorComparator :
25  {
26 public:
27 
28  // @name Constructors and Destructors
29  // @{
32 
35 
38  // @}
39 
40  // @name Operators
41  // @{
44 
45  double operator()(const PeakSpectrum & a, const PeakSpectrum & b) const override;
46 
47  double operator()(const PeakSpectrum & a) const override;
48  // @}
49 
50  // @name Accessors
51  // @{
54 
56  static const String getProductName()
57  {
58  return "SpectrumPrecursorComparator";
59  }
60 
61  // @}
62 
63  };
64 
65 }
66 
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
SpectrumPrecursorComparator compares just the parent mass of two spectra.
Definition: SpectrumPrecursorComparator.h:25
double operator()(const PeakSpectrum &a, const PeakSpectrum &b) const override
function call operator, calculates the similarity
SpectrumPrecursorComparator(const SpectrumPrecursorComparator &source)
copy constructor
SpectrumPrecursorComparator()
default constructor
SpectrumPrecursorComparator & operator=(const SpectrumPrecursorComparator &source)
assignment operator
double operator()(const PeakSpectrum &a) const override
calculates self similarity
~SpectrumPrecursorComparator() override
destructor
static PeakSpectrumCompareFunctor * create()
Definition: SpectrumPrecursorComparator.h:53
static const String getProductName()
Definition: SpectrumPrecursorComparator.h:56
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22