1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#pragma once
#include <contrib/libs/miniselect/include/miniselect/floyd_rivest_select.h>
namespace NYql {
template <class RandomIt>
void FastNthElement(RandomIt first, RandomIt middle, RandomIt last) {
::miniselect::floyd_rivest_select(first, middle, last);
}
template <class RandomIt, class Compare>
void FastNthElement(RandomIt first, RandomIt middle, RandomIt last, Compare compare) {
::miniselect::floyd_rivest_select(first, middle, last, compare);
}
template <class RandomIt>
void FastPartialSort(RandomIt first, RandomIt middle, RandomIt last) {
::miniselect::floyd_rivest_partial_sort(first, middle, last);
}
template <class RandomIt, class Compare>
void FastPartialSort(RandomIt first, RandomIt middle, RandomIt last, Compare compare) {
::miniselect::floyd_rivest_partial_sort(first, middle, last, compare);
}
}
|