File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ std::vector<size_t> BestElementFinder::findBestElements(const size_t candidates_
3333 const auto begin = best_candidates.begin ();
3434 auto end = best_candidates.end ();
3535
36- // Now run the criteria passes until we have a single outsider or no more cirteria
36+ // Now run the criteria passes until we have a single outsider or no more criteria
3737 for (const CriteriaPass& criteria_pass : criteria_)
3838 {
3939 // For each element, reset score, process each criterion and apply weights to get the global score
@@ -67,6 +67,13 @@ std::vector<size_t> BestElementFinder::findBestElements(const size_t candidates_
6767 }
6868 }
6969
70+ std::sort (
71+ begin,
72+ end,
73+ [](const Candidate& candidate1, const Candidate& candidate2)
74+ {
75+ return candidate1.score > candidate2.score ;
76+ });
7077 std::vector<size_t > best_candidates_indices;
7178 best_candidates_indices.reserve (std::distance (begin, end));
7279 for (auto iterator = begin; iterator != end; ++iterator)
You can’t perform that action at this time.
0 commit comments