Template Function eastl::promote_heap(RandomAccessIterator, Distance, Distance, T&&)¶
- Defined in File heap.h
promote_heap(RandomAccessIterator first, Distance topPosition, Distance position, T &&value)
Moves a value in the heap from a given position upward until it is sorted correctly. It’s kind of like bubble-sort, except that instead of moving linearly from the back of a list to the front, it moves from the bottom of the tree up the branches towards the top. But otherwise is just like bubble-sort.
This function requires that the value argument refer to a value that is currently not within the heap.