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>
48 namespace IdentificationDataInternal
56 std::map<ScoreTypeRef, double>
scores;
60 boost::none,
const std::map<ScoreTypeRef, double>&
scores =
61 std::map<ScoreTypeRef, double>()):
79 std::vector<std::pair<ScoreTypeRef, double>> result;
80 std::set<ScoreTypeRef> scores_done;
87 auto pos =
scores.find(score_ref);
90 result.push_back(*pos);
91 scores_done.insert(score_ref);
95 for (
const auto& pair:
scores)
97 if (!scores_done.count(pair.first))
99 result.push_back(pair);
108 typedef boost::multi_index_container<
109 AppliedProcessingStep,
110 boost::multi_index::indexed_by<
111 boost::multi_index::sequenced<>,
112 boost::multi_index::ordered_unique<
113 boost::multi_index::member<
114 AppliedProcessingStep, boost::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, boost::optional< ProcessingStepRef >, &AppliedProcessingStep::processing_step_opt > > > > AppliedProcessingSteps
Definition: AppliedProcessingStep.h:116
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
A processing step that was applied to a data item, possibly with associated scores.
Definition: AppliedProcessingStep.h:53
std::map< ScoreTypeRef, double > scores
Definition: AppliedProcessingStep.h:56
bool operator==(const AppliedProcessingStep &other) const
Definition: AppliedProcessingStep.h:66
boost::optional< ProcessingStepRef > processing_step_opt
Definition: AppliedProcessingStep.h:55
std::vector< std::pair< ScoreTypeRef, double > > getScoresInOrder() const
Return scores in order of priority (primary first).
Definition: AppliedProcessingStep.h:77
AppliedProcessingStep(const boost::optional< ProcessingStepRef > &processing_step_opt=boost::none, const std::map< ScoreTypeRef, double > &scores=std::map< ScoreTypeRef, double >())
Definition: AppliedProcessingStep.h:58