Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <top_n.h>
Cmp is an stl binary predicate. Note that Cmp is the "greater" predicate, not the more commonly used "less" predicate.
If you use a "less" predicate here, the TopN will pick out the bottom N elements out of the ones passed to it, and it will return them sorted in ascending order.
TopN is rule-of-zero copyable and movable if its members are.