OpenMS
ILPDCWrapper.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: Chris Bielow $
6 // $Authors: Chris Bielow $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 
13 
14 #include <vector>
15 #include <set>
16 #include <map>
17 
18 namespace OpenMS
19 {
20 
21  class MassExplainer;
22  class FeatureMap;
23  class ChargePair;
24 
25  class OPENMS_DLLAPI ILPDCWrapper
26  {
27 
28 public:
29  typedef std::vector<ChargePair> PairsType;
30  typedef PairsType::size_type PairsIndex;
31 
34 
36  virtual ~ILPDCWrapper();
37 
42  double compute(const FeatureMap& fm, PairsType& pairs, Size verbose_level) const;
43 
44 private:
45 
47  double computeSlice_(const FeatureMap& fm,
48  PairsType& pairs,
49  const PairsIndex margin_left,
50  const PairsIndex margin_right,
51  const Size verbose_level) const;
52 
54  double computeSliceOld_(const FeatureMap& fm,
55  PairsType& pairs,
56  const PairsIndex margin_left,
57  const PairsIndex margin_right,
58  const Size verbose_level) const;
59 
61  double getLogScore_(const PairsType::value_type& pair, const FeatureMap& fm) const;
62 
63  typedef std::map<String, std::set<Size> > FeatureType_;
64 
65  // add another charge annotation variant for a feature
66  void updateFeatureVariant_(FeatureType_& f_set, const String& rota_l, const Size& v) const;
67 
68 
69 
70  }; // !class
71 
72 } // !namespace
73 
A container for features.
Definition: FeatureMap.h:80
Definition: ILPDCWrapper.h:26
double computeSliceOld_(const FeatureMap &fm, PairsType &pairs, const PairsIndex margin_left, const PairsIndex margin_right, const Size verbose_level) const
slicing the problem into subproblems
std::vector< ChargePair > PairsType
Definition: ILPDCWrapper.h:29
std::map< String, std::set< Size > > FeatureType_
Definition: ILPDCWrapper.h:63
double getLogScore_(const PairsType::value_type &pair, const FeatureMap &fm) const
calculate a score for the i_th edge
ILPDCWrapper()
Constructor.
double computeSlice_(const FeatureMap &fm, PairsType &pairs, const PairsIndex margin_left, const PairsIndex margin_right, const Size verbose_level) const
slicing the problem into subproblems
void updateFeatureVariant_(FeatureType_ &f_set, const String &rota_l, const Size &v) const
virtual ~ILPDCWrapper()
Destructor.
double compute(const FeatureMap &fm, PairsType &pairs, Size verbose_level) const
PairsType::size_type PairsIndex
Definition: ILPDCWrapper.h:30
A more convenient string class.
Definition: String.h:34
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:97
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19