|
template<class Iter , class Comp = std::ranges::less, class Proj = std::identity> |
constexpr void | sequoia::bubble_up (Iter begin, Iter current, Comp comp={}, Proj proj={}) |
|
template<class Iter , class Comp = std::ranges::less, class Proj = std::identity> |
constexpr void | sequoia::bubble_down (Iter begin, Iter current, Iter end, Comp comp={}, Proj proj={}) |
|
template<class Iter , class Comp = std::ranges::less, class Proj = std::identity> |
constexpr void | sequoia::make_heap (Iter begin, Iter end, Comp comp={}, Proj proj={}) |
|
template<class Iter , class Comp = std::ranges::less, class Proj = std::identity> |
constexpr void | sequoia::sort (Iter begin, Iter end, Comp comp={}, Proj proj={}) |
|
template<std::input_iterator Iter, std::weakly_incrementable OutIter, class Comp = std::ranges::less, class Proj = std::identity>
requires merge_sortable<Iter, Comp, Proj> |
constexpr void | sequoia::stable_sort (Iter first, Iter last, OutIter out, Comp compare={}, Proj proj={}) |
|
template<std::input_iterator Iter, class Comp = std::ranges::less, class Proj = std::identity>
requires merge_sortable<Iter, Comp, Proj> |
constexpr void | sequoia::stable_sort (Iter first, Iter last, Comp compare={}, Proj proj={}) |
|
template<std::forward_iterator Iter, class Comp = std::ranges::equal_to, class Proj = std::identity>
requires clusterable<Iter, Comp, Proj> |
constexpr void | sequoia::cluster (Iter begin, Iter end, Comp comp={}, Proj proj={}) |
| An algorithm which clusters together elements which compare equal.
|
|
A collection of constexpr algorithms.
template<std::forward_iterator Iter, class Comp = std::ranges::equal_to, class Proj = std::identity>
requires clusterable<Iter, Comp, Proj>
constexpr void sequoia::cluster |
( |
Iter |
begin, |
|
|
Iter |
end, |
|
|
Comp |
comp = {} , |
|
|
Proj |
proj = {} |
|
) |
| |
|
constexpr |
An algorithm which clusters together elements which compare equal.
This is best used in situations where operator< is not defined.
template<class Iter , class Comp = std::ranges::less, class Proj = std::identity>
constexpr void sequoia::sort |
( |
Iter |
begin, |
|
|
Iter |
end, |
|
|
Comp |
comp = {} , |
|
|
Proj |
proj = {} |
|
) |
| |
|
constexpr |
This version of swap is retained, at least for now, since it is guaranteed to use ranges::iter_swap internally. This means that the behaviour can be customized by overloading iter_swap. Currently, this is exploited to sort graph nodes. This needs further thought, not least since ranges::advance etc cannot be used in the implementation