20 #ifndef THETA_COMPARATORS_HPP_
21 #define THETA_COMPARATORS_HPP_
25 template<
typename ExtractKey>
26 struct compare_by_key {
27 template<
typename Entry1,
typename Entry2>
28 bool operator()(Entry1&& a, Entry2&& b)
const {
29 return ExtractKey()(std::forward<Entry1>(a)) < ExtractKey()(std::forward<Entry2>(b));
35 template<
typename Key,
typename Entry,
typename ExtractKey>
38 explicit key_less_than(
const Key& key): key(key) {}
39 bool operator()(
const Entry& entry)
const {
40 return ExtractKey()(entry) < this->key;
DataSketches namespace.
Definition: binomial_bounds.hpp:38