14 #include <boost/range/adaptor/reversed.hpp>
15 #include <boost/multi_index_container.hpp>
16 #include <boost/multi_index/member.hpp>
17 #include <boost/multi_index/ordered_index.hpp>
18 #include <boost/multi_index/sequenced_index.hpp>
24 namespace IdentificationDataInternal
39 std::map<ScoreTypeRef, double>
scores;
44 std::nullopt,
const std::map<ScoreTypeRef, double>&
scores =
45 std::map<ScoreTypeRef, double>()):
65 std::vector<std::pair<ScoreTypeRef, double>>
68 std::vector<std::pair<ScoreTypeRef, double>> result;
69 std::set<ScoreTypeRef> scores_done;
76 auto pos =
scores.find(score_ref);
79 result.push_back(*pos);
80 if (primary_only)
return result;
81 scores_done.insert(score_ref);
85 for (
const auto& pair:
scores)
87 if (!scores_done.count(pair.first))
89 result.push_back(pair);
90 if (primary_only)
return result;
99 typedef boost::multi_index_container<
100 AppliedProcessingStep,
101 boost::multi_index::indexed_by<
102 boost::multi_index::sequenced<>,
103 boost::multi_index::ordered_unique<
104 boost::multi_index::member<
105 AppliedProcessingStep, std::optional<ProcessingStepRef>,
boost::multi_index_container< AppliedProcessingStep, boost::multi_index::indexed_by< boost::multi_index::sequenced<>, boost::multi_index::ordered_unique< boost::multi_index::member< AppliedProcessingStep, std::optional< ProcessingStepRef >, &AppliedProcessingStep::processing_step_opt > > > > AppliedProcessingSteps
Definition: AppliedProcessingStep.h:107
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition: AppliedProcessingStep.h:30
std::map< ScoreTypeRef, double > scores
Map of scores and their types.
Definition: AppliedProcessingStep.h:39
bool operator==(const AppliedProcessingStep &other) const
Equality operator (needed for multi-index container)
Definition: AppliedProcessingStep.h:51
std::optional< ProcessingStepRef > processing_step_opt
(Optional) reference to the processing step
Definition: AppliedProcessingStep.h:36
std::vector< std::pair< ScoreTypeRef, double > > getScoresInOrder(bool primary_only=false) const
Return scores in order of priority (primary first).
Definition: AppliedProcessingStep.h:66
AppliedProcessingStep(const std::optional< ProcessingStepRef > &processing_step_opt=std::nullopt, const std::map< ScoreTypeRef, double > &scores=std::map< ScoreTypeRef, double >())
Constructor.
Definition: AppliedProcessingStep.h:42