MCPcopy Create free account
hub / github.com/FastLED/FastLED / heap_sort

Function heap_sort

src/fl/stl/algorithm.h:398–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396
397template <typename Iterator, typename Compare>
398void heap_sort(Iterator first, Iterator last, Compare comp) FL_NOEXCEPT {
399 heapify(first, last, comp);
400
401 Iterator end = last - 1;
402 while (end > first) {
403 swap(*end, *first);
404 sift_down(first, first, end - 1, comp);
405 --end;
406 }
407}
408
409// Quicksort implementation
410template <typename Iterator, typename Compare>

Callers

nothing calls this directly

Calls 3

heapifyFunction · 0.85
swapFunction · 0.70
sift_downFunction · 0.70

Tested by

no test coverage detected