pop_heap [C++ Reference]
Keywords: stl,algorithm,pop_heap
Date: 2009-10-12T07:13:14-0700

[[pop_heap]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

## pop_heap

Syntax:

        #include <algorithm>
        void pop_heap( random_access_iterator start, random_access_iterator end );
        void pop_heap( random_access_iterator start, random_access_iterator end, StrictWeakOrdering cmp );

The pop_heap() function removes the largest element (defined as the element at the front of the heap) from the given heap.

If the strict weak ordering comparison function object cmp is given, then it is used instead of the < operator to compare elements.

pop_heap() runs in logarithmic time.

Related Topics: is_heap, make_heap, push_heap, sort_heap

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •