Template Function eastl::sort_heap(RandomAccessIterator, RandomAccessIterator)¶
- Defined in File heap.h
Function Documentation¶
-
template<typename
RandomAccessIterator
>
voideastl
::
sort_heap
(RandomAccessIterator first, RandomAccessIterator last) sort_heap
After the application if this algorithm, the range it was applied to is no longer a heap, though it will be a reverse heap (smallest first). The item with the lowest priority will be first, and the highest last. This is not a stable sort because the relative order of equivalent elements is not necessarily preserved. The range referenced must be valid; all pointers must be dereferenceable and within the sequence the last position is reachable from the first by incrementation. The complexity is at most O(n * log(n)), where n is count of the range.