Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
ChargePair.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2017.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Chris Bielow $
32 // $Authors: $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_DATASTRUCTURES_CHARGEPAIR_H
36 #define OPENMS_DATASTRUCTURES_CHARGEPAIR_H
37 
39 #include <OpenMS/CONCEPT/Types.h>
40 #include <OpenMS/OpenMSConfig.h>
41 
42 #include <iosfwd>
43 #include <vector>
44 
45 namespace OpenMS
46 {
47 
58  class OPENMS_DLLAPI ChargePair
59  {
60 
61 public:
63 
64  ChargePair();
66 
68  ChargePair(const Size& index0,
69  const Size& index1,
70  const Int& charge0,
71  const Int& charge1,
72  const Compomer& compomer,
73  const double& mass_diff,
74  const bool active);
75 
77  ChargePair(const ChargePair& rhs);
78 
80  ChargePair& operator=(const ChargePair& rhs);
81 
83  virtual ~ChargePair();
84 
86 
87  //@name Accessors
89  Int getCharge(UInt pairID) const;
91 
93  void setCharge(UInt pairID, Int e);
94 
96  Size getElementIndex(UInt pairID) const;
97 
99  void setElementIndex(UInt pairID, Size e);
100 
102  const Compomer& getCompomer() const;
103 
105  void setCompomer(const Compomer& compomer);
106 
108  double getMassDiff() const;
109 
111  void setMassDiff(double mass_diff);
112 
114  double getEdgeScore() const;
115 
117  void setEdgeScore(double score);
118 
120  bool isActive() const;
121 
122  void setActive(const bool active);
123 
125 
127  virtual bool operator==(const ChargePair& i) const;
128 
130  virtual bool operator!=(const ChargePair& i) const;
131 
132 protected:
133 
145  double mass_diff_;
147  double score_;
150  };
151 
153  OPENMS_DLLAPI std::ostream& operator<<(std::ostream& os, const ChargePair& cons);
154 
155 } // namespace OpenMS
156 
157 #endif // OPENMS_DATASTRUCTURES_CHARGEPAIR_H
bool is_active_
was this pair realized by ILP?
Definition: ChargePair.h:149
Size feature1_index_
Int of the second element within the FeatureMap.
Definition: ChargePair.h:137
unsigned int UInt
Unsigned integer type.
Definition: Types.h:95
double score_
Score of this edge used in ILP.
Definition: ChargePair.h:147
Holds information on an edge connecting two features from a (putative) charge ladder.
Definition: Compomer.h:59
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
Representation of a (putative) link between two Features, which stem from the same compound but have ...
Definition: ChargePair.h:58
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Compomer compomer_
Compomer that explains the mass difference.
Definition: ChargePair.h:143
double mass_diff_
mass difference (after explanation by compomer)
Definition: ChargePair.h:145
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
Int feature1_charge_
Assumed charge of the second feature.
Definition: ChargePair.h:141
Size feature0_index_
Int of the first element within the FeatureMap.
Definition: ChargePair.h:135
bool operator!=(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:824
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
Int feature0_charge_
Assumed charge of the first feature.
Definition: ChargePair.h:139
int Int
Signed integer type.
Definition: Types.h:103

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:21:59 using doxygen 1.8.13