25 using vector_of_values = std::vector<iterator_value_t<it_t>>;
35 template<
class random_it_t>
36 inline bool sort_required(random_it_t begin, random_it_t end);
48 template<
class random_it_t,
class compare_t = std::less<>>
49 inline void sort_insertion(random_it_t begin, random_it_t end, compare_t compare = compare_t());
60 template<
class container_t,
class compare_t = std::less<>>
61 inline void sort_insertion(container_t& cont, compare_t compare = compare_t());
73 template<
class random_it_t,
class compare_t = std::less<>>
74 inline void sort_selection(random_it_t begin, random_it_t end, compare_t compare = compare_t());
85 template<
class container_t,
class compare_t = std::less<>>
86 inline void sort_selection(container_t& cont, compare_t compare = compare_t());
98 template<
class random_it_t,
class compare_t = std::less<>>
99 inline void sort_bubble(random_it_t begin, random_it_t end, compare_t compare = compare_t());
110 template<
class container_t,
class compare_t = std::less<>>
111 inline void sort_bubble(container_t& cont, compare_t compare = compare_t());
123 template<
class random_it_t,
class compare_t>
124 inline void adjust_heap(random_it_t begin,
size_t nHeapSize,
size_t nPosition, compare_t compare = compare_t());
134 template<
class random_it_t,
class compare_t>
135 inline void make_heap(random_it_t begin, random_it_t end, compare_t compare = compare_t());
147 template<
class random_it_t,
class compare_t = std::less<>>
148 inline void sort_heap(random_it_t begin, random_it_t end, compare_t compare = compare_t());
159 template<
class container_t,
class compare_t = std::less<>>
160 inline void sort_heap(container_t& cont, compare_t compare = compare_t());
172 template<
class random_it_t,
class compare_t = std::less<>>
173 inline void sort_quick_hoare(random_it_t begin, random_it_t end, compare_t compare = compare_t());
184 template<
class container_t,
class compare_t = std::less<>>
185 inline void sort_quick_hoare(container_t& cont, compare_t compare = compare_t());
197 template<
class random_it_t,
class compare_t = std::less<>>
198 inline void sort_quick_three_way(random_it_t begin, random_it_t end, compare_t compare = compare_t());
209 template<
class container_t,
class compare_t = std::less<>>
222 template<
class random_it_t,
class compare_t = std::less<>>
223 inline void sort_quick_dual_pivot(random_it_t begin, random_it_t end, compare_t compare = compare_t());
234 template<
class container_t,
class compare_t = std::less<>>
247 template<
class random_it_t,
class compare_t = std::less<>>
251 compare_t compare = compare_t(),
252 vector_of_values<random_it_t>* pPreallocatedBuffer =
nullptr);
265 template<
class random_it_t,
class compare_t = std::less<>>
269 compare_t compare = compare_t(),
270 vector_of_values<random_it_t>* pPreallocatedBuffer =
nullptr);
282 template<
class container_t,
class compare_t = std::less<>>
285 compare_t compare = compare_t(),
286 vector_of_values<typename container_t::iterator>* pPreallocatedBuffer =
nullptr);
299 template<
class random_it_t,
class compare_t = std::less<>>
303 compare_t compare = compare_t(),
304 size_t nMaxBufferSize = SORT_COUNTING_MAX_BUFFER_SIZE);
316 template<
class container_t,
class compare_t = std::less<>>
319 compare_t compare = compare_t(),
320 size_t nMaxBufferSize = SORT_COUNTING_MAX_BUFFER_SIZE);
330 template<
class random_it_t,
class compare_t = std::less<>>
331 inline void sort(random_it_t begin, random_it_t end, compare_t compare = compare_t());
340 template<
class container_t,
class compare_t = std::less<>>
341 inline void sort(container_t& cont, compare_t compare = compare_t());
void sort_selection(random_it_t begin, random_it_t end, compare_t compare=compare_t())
Selection sort.
void sort_quick_three_way(random_it_t begin, random_it_t end, compare_t compare=compare_t())
Quick sort based on three-way partitioning.
void sort_insertion(random_it_t begin, random_it_t end, compare_t compare=compare_t())
Insertion sort.
void sort_heap(random_it_t begin, random_it_t end, compare_t compare=compare_t())
Heap sort.
void sort_bubble(random_it_t begin, random_it_t end, compare_t compare=compare_t())
Bubble sort.
void sort(random_it_t begin, random_it_t end, compare_t compare=compare_t())
Sort by the most suitable algorithm.
bool sort_counting(random_it_t begin, random_it_t end, compare_t compare=compare_t(), size_t nMaxBufferSize=SORT_COUNTING_MAX_BUFFER_SIZE)
Counting sort for integral values.
void adjust_heap(random_it_t begin, size_t nHeapSize, size_t nPosition, compare_t compare=compare_t())
Adjust heap.
bool sort_required(random_it_t begin, random_it_t end)
Check if sort really needed.
void sort_quick_hoare(random_it_t begin, random_it_t end, compare_t compare=compare_t())
Quick sort based on Hoare partitioning.
void make_heap(random_it_t begin, random_it_t end, compare_t compare=compare_t())
Make heap at range.
constexpr size_t SORT_COUNTING_MAX_BUFFER_SIZE
vector of iterator value
void merge(random_it_t begin, random_it_t end, compare_t compare=compare_t(), vector_of_values< random_it_t > *pPreallocatedBuffer=nullptr)
Merge with temp vector.
void sort_quick_dual_pivot(random_it_t begin, random_it_t end, compare_t compare=compare_t())
Quick sort based on dual-pivot partitioning.
void sort_merge(random_it_t begin, random_it_t end, compare_t compare=compare_t(), vector_of_values< random_it_t > *pPreallocatedBuffer=nullptr)
Merge sort based on merge with temp vector.