libstdc++
|
Functions | |
template<typename _RandomAccessIterator > | |
bool | std::is_heap (_RandomAccessIterator __first, _RandomAccessIterator __last) |
template<typename _RandomAccessIterator , typename _Compare > | |
bool | std::is_heap (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) |
template<typename _RandomAccessIterator > | |
_RandomAccessIterator | std::is_heap_until (_RandomAccessIterator __first, _RandomAccessIterator __last) |
template<typename _RandomAccessIterator , typename _Compare > | |
_RandomAccessIterator | std::is_heap_until (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) |
template<typename _RandomAccessIterator > | |
void | std::make_heap (_RandomAccessIterator __first, _RandomAccessIterator __last) |
template<typename _RandomAccessIterator , typename _Compare > | |
void | std::make_heap (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) |
template<typename _RandomAccessIterator > | |
void | std::pop_heap (_RandomAccessIterator __first, _RandomAccessIterator __last) |
template<typename _RandomAccessIterator , typename _Compare > | |
void | std::pop_heap (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) |
template<typename _RandomAccessIterator > | |
void | std::push_heap (_RandomAccessIterator __first, _RandomAccessIterator __last) |
template<typename _RandomAccessIterator , typename _Compare > | |
void | std::push_heap (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) |
template<typename _RandomAccessIterator > | |
void | std::sort_heap (_RandomAccessIterator __first, _RandomAccessIterator __last) |
template<typename _RandomAccessIterator , typename _Compare > | |
void | std::sort_heap (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) |
|
inline |
Determines whether a range is a heap.
first | Start of range. |
last | End of range. |
Definition at line 560 of file stl_heap.h.
References std::is_heap_until().
|
inline |
Determines whether a range is a heap using comparison functor.
first | Start of range. |
last | End of range. |
comp | Comparison functor to use. |
Definition at line 573 of file stl_heap.h.
References std::is_heap_until().
|
inline |
Search the end of a heap.
first | Start of range. |
last | End of range. |
This operation returns the last iterator i in [first, last) for which the range [first, i) is a heap.
Definition at line 512 of file stl_heap.h.
References std::distance().
|
inline |
Search the end of a heap using comparison functor.
first | Start of range. |
last | End of range. |
comp | Comparison functor to use. |
This operation returns the last iterator i in [first, last) for which the range [first, i) is a heap. Comparisons are made using comp.
Definition at line 538 of file stl_heap.h.
References std::distance().
Referenced by std::is_heap().
void std::make_heap | ( | _RandomAccessIterator | __first, |
_RandomAccessIterator | __last | ||
) |
Construct a heap over a range.
first | Start of heap. |
last | End of heap. |
This operation makes the elements in [first,last) into a heap.
Definition at line 375 of file stl_heap.h.
void std::make_heap | ( | _RandomAccessIterator | __first, |
_RandomAccessIterator | __last, | ||
_Compare | __comp | ||
) |
Construct a heap over a range using comparison functor.
first | Start of heap. |
last | End of heap. |
comp | Comparison functor to use. |
This operation makes the elements in [first,last) into a heap. Comparisons are made using comp.
Definition at line 415 of file stl_heap.h.
Referenced by std::__heap_select(), std::partial_sort_copy(), and std::priority_queue< _Tp, _Sequence, _Compare >::priority_queue().
|
inline |
Pop an element off a heap.
first | Start of heap. |
last | End of heap. |
This operation pops the top of the heap. The elements first and last-1 are swapped and [first,last-1) is made into a heap.
Definition at line 278 of file stl_heap.h.
|
inline |
Pop an element off a heap using comparison functor.
first | Start of heap. |
last | End of heap. |
comp | Comparison functor to use. |
This operation pops the top of the heap. The elements first and last-1 are swapped and [first,last-1) is made into a heap. Comparisons are made using comp.
Definition at line 352 of file stl_heap.h.
Referenced by std::priority_queue< _Tp, _Sequence, _Compare >::pop().
|
inline |
Push an element onto a heap.
first | Start of heap. |
last | End of heap + element. |
This operation pushes the element at last-1 onto the valid heap over the range [first,last-1). After completion, [first,last) is a valid heap.
Definition at line 156 of file stl_heap.h.
|
inline |
Push an element onto a heap using comparison functor.
first | Start of heap. |
last | End of heap + element. |
comp | Comparison functor. |
This operation pushes the element at last-1 onto the valid heap over the range [first,last-1). After completion, [first,last) is a valid heap. Compare operations are performed using comp.
Definition at line 205 of file stl_heap.h.
Referenced by std::priority_queue< _Tp, _Sequence, _Compare >::push().
void std::sort_heap | ( | _RandomAccessIterator | __first, |
_RandomAccessIterator | __last | ||
) |
Sort a heap.
first | Start of heap. |
last | End of heap. |
This operation sorts the valid heap in the range [first,last).
Definition at line 454 of file stl_heap.h.
void std::sort_heap | ( | _RandomAccessIterator | __first, |
_RandomAccessIterator | __last, | ||
_Compare | __comp | ||
) |
Sort a heap using comparison functor.
first | Start of heap. |
last | End of heap. |
comp | Comparison functor to use. |
This operation sorts the valid heap in the range [first,last). Comparisons are made using comp.
Definition at line 483 of file stl_heap.h.
Referenced by std::partial_sort(), and std::partial_sort_copy().