48 size_t getMostFrequentValues(IN
const std::map<
size_t, std::set< T >> &frequencies, OUT std::set<T>& values, IN OPTIONAL
size_t top = 0, IN OPTIONAL
size_t maxDiff = 0)
50 auto itr = frequencies.rbegin();
51 if (itr == frequencies.rend()) {
55 const size_t mFreq = itr->first;
57 for (
size_t i = 0; i < top && itr != frequencies.rend(); ++itr, ++i) {
58 const size_t diff = prev - itr->first;
60 std::cout <<
"Freq: " << itr->first <<
" diff : " << diff <<
"\n";
62 if (diff > maxDiff)
break;
64 values.insert(itr->second.begin(), itr->second.end());