Node:Heap operations, Next:Minimum and maximum, Previous:Set operations on sorted structures, Up:Sorting and related operations
[a, b).
Its two key properties are: (1) *a is the
largest element in the range and (2) *a may be removed by
pop_heap, or a
new element added by push_heap,
in O(\log N) time. These properties make
heaps useful as priority queues. make_heap converts a range into a heap
and sort_heap turns a heap into a sorted sequence.
| push_heap (RandomAccessIterator first, RandomAccessIterator last) | Function |
| push_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp) | Function |
template
|
| pop_heap (RandomAccessIterator first, RandomAccessIterator last) | Function |
| pop_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp) | Function |
template
|
| make_heap (RandomAccessIterator first, RandomAccessIterator last) | Function |
| make_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp) | Function |
template
|
| sort_heap (RandomAccessIterator first, RandomAccessIterator last) | Function |
| sort_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp) | Function |
template
|