40 #include <boost/range/adaptor/reversed.hpp>
41 #include <boost/multi_index_container.hpp>
42 #include <boost/multi_index/member.hpp>
43 #include <boost/multi_index/ordered_index.hpp>
44 #include <boost/multi_index/sequenced_index.hpp>
50 namespace IdentificationDataInternal
65 std::map<ScoreTypeRef, double>
scores;
70 std::nullopt,
const std::map<ScoreTypeRef, double>&
scores =
71 std::map<ScoreTypeRef, double>()):
91 std::vector<std::pair<ScoreTypeRef, double>>
94 std::vector<std::pair<ScoreTypeRef, double>> result;
95 std::set<ScoreTypeRef> scores_done;
102 auto pos =
scores.find(score_ref);
105 result.push_back(*pos);
106 if (primary_only)
return result;
107 scores_done.insert(score_ref);
111 for (
const auto& pair:
scores)
113 if (!scores_done.count(pair.first))
115 result.push_back(pair);
116 if (primary_only)
return result;
125 typedef boost::multi_index_container<
126 AppliedProcessingStep,
127 boost::multi_index::indexed_by<
128 boost::multi_index::sequenced<>,
129 boost::multi_index::ordered_unique<
130 boost::multi_index::member<
131 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:133
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48
Definition: AppliedProcessingStep.h:56
std::map< ScoreTypeRef, double > scores
Map of scores and their types.
Definition: AppliedProcessingStep.h:65
bool operator==(const AppliedProcessingStep &other) const
Equality operator (needed for multi-index container)
Definition: AppliedProcessingStep.h:77
std::optional< ProcessingStepRef > processing_step_opt
(Optional) reference to the processing step
Definition: AppliedProcessingStep.h:62
std::vector< std::pair< ScoreTypeRef, double > > getScoresInOrder(bool primary_only=false) const
Return scores in order of priority (primary first).
Definition: AppliedProcessingStep.h:92
AppliedProcessingStep(const std::optional< ProcessingStepRef > &processing_step_opt=std::nullopt, const std::map< ScoreTypeRef, double > &scores=std::map< ScoreTypeRef, double >())
Constructor.
Definition: AppliedProcessingStep.h:68