OpenMS
Loading...
Searching...
No Matches
ObservationMatchGroup.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: Hendrik Weisser $
6// $Authors: Hendrik Weisser $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12
14
15
16namespace OpenMS
17{
18 namespace IdentificationDataInternal
19 {
25 {
26 std::set<ObservationMatchRef> observation_match_refs;
27
28 bool allSameMolecule() const
29 {
30 // @TODO: return true or false for the empty set?
31 if (observation_match_refs.size() <= 1) return true;
32 const IdentifiedMolecule var =
33 (*observation_match_refs.begin())->identified_molecule_var;
34 for (auto it = ++observation_match_refs.begin();
35 it != observation_match_refs.end(); ++it)
36 {
37 if (!((*it)->identified_molecule_var == var)) return false;
38 }
39 return true;
40 }
41
42 bool allSameQuery() const
43 {
44 // @TODO: return true or false for the empty set?
45 if (observation_match_refs.size() <= 1) return true;
46 ObservationRef ref = (*observation_match_refs.begin())->observation_ref;
47 for (auto it = ++observation_match_refs.begin();
48 it != observation_match_refs.end(); ++it)
49 {
50 if ((*it)->observation_ref != ref) return false;
51 }
52 return true;
53 }
54
55 bool operator==(const ObservationMatchGroup& rhs) const
56 {
59 }
60
61 bool operator!=(const ObservationMatchGroup& rhs) const
62 {
63 return !operator==(rhs);
64 }
65 };
66
69 }
70}
A collection of identification records, unique and ordered by the key formed from the members KeyMemb...
Definition IDDataContainer.h:62
IteratorWrapper< ObservationMatchGroups::iterator > MatchGroupRef
Definition ObservationMatchGroup.h:68
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Variant type holding Peptide/Compound/Oligo references and convenience functions.
Definition IdentifiedMolecule.h:29
: Group of related (co-identified) input matches
Definition ObservationMatchGroup.h:25
bool allSameQuery() const
Definition ObservationMatchGroup.h:42
bool operator==(const ObservationMatchGroup &rhs) const
Definition ObservationMatchGroup.h:55
bool operator!=(const ObservationMatchGroup &rhs) const
Definition ObservationMatchGroup.h:61
bool allSameMolecule() const
Definition ObservationMatchGroup.h:28
std::set< ObservationMatchRef > observation_match_refs
Definition ObservationMatchGroup.h:26
Base class for ID data with scores and processing steps (and meta info)
Definition ScoredProcessingResult.h:20
AppliedProcessingSteps steps_and_scores
Definition ScoredProcessingResult.h:21