FastLED 3.10.8
Loading...
Searching...
No Matches

◆ heap_sort()

template<typename Iterator, typename Compare>
void fl::detail::heap_sort ( Iterator first,
Iterator last,
Compare comp )

Definition at line 403 of file algorithm.h.

403 {
404 heapify(first, last, comp);
405
406 Iterator end = last - 1;
407 while (end > first) {
408 swap(*end, *first);
409 sift_down(first, first, end - 1, comp);
410 --end;
411 }
412}
constexpr T * end(T(&array)[N]) FL_NO_EXCEPT
void heapify(Iterator first, Iterator last, Compare comp) FL_NO_EXCEPT
Definition algorithm.h:390
void sift_down(Iterator first, Iterator start, Iterator end, Compare comp) FL_NO_EXCEPT
Definition algorithm.h:365
void swap(array< T, N > &lhs, array< T, N > &rhs) FL_NO_EXCEPT
Definition array.h:209

References fl::adl_barrier::end(), fl::FL_NO_EXCEPT, heapify(), sift_down(), and fl::swap().

+ Here is the call graph for this function: