UFO
|
Functions | |
template<typename RandomIt , typename UnaryOperation > | |
void | sinkParent (typename RandomIt::difference_type parentIndex, RandomIt heapStart, typename RandomIt::difference_type heapLength, const UnaryOperation &key) |
template<typename RandomIt , typename UnaryOperation > | |
void | makeHeap (RandomIt first, RandomIt last, const UnaryOperation &key) |
Arrange the range [first, last) into a max-heap ordered by key key . More... | |
template<typename RandomIt , typename UnaryOperation > | |
void | sortHeap (RandomIt first, RandomIt last, const UnaryOperation &key) |
Sort the heap [first, last) in the order of ascending keys. More... | |
void ufo::metofficesortdetail::makeHeap | ( | RandomIt | first, |
RandomIt | last, | ||
const UnaryOperation & | key | ||
) |
Arrange the range [first, last)
into a max-heap ordered by key key
.
Definition at line 55 of file src/ufo/utils/metoffice/MetOfficeSort.h.
void ufo::metofficesortdetail::sinkParent | ( | typename RandomIt::difference_type | parentIndex, |
RandomIt | heapStart, | ||
typename RandomIt::difference_type | heapLength, | ||
const UnaryOperation & | key | ||
) |
Sink element parentIndex
of the heap starting at heapStart
with heapLength
elements until its correct position.
If the parent's key is smaller than the key of any of its children, the parent is swapped with its largest child. This is repeated until the parent's key is at least as large as the keys of its children.
Definition at line 24 of file src/ufo/utils/metoffice/MetOfficeSort.h.
void ufo::metofficesortdetail::sortHeap | ( | RandomIt | first, |
RandomIt | last, | ||
const UnaryOperation & | key | ||
) |
Sort the heap [first, last)
in the order of ascending keys.
Definition at line 65 of file src/ufo/utils/metoffice/MetOfficeSort.h.