is_heap [C++ Reference]
Keywords: stl,algorithm,is_heap
Date: 2008-10-14T15:42:05-0700

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

- en
- br-pt
- cn
- fr
- it
- jp
- pl
- ru
- tr

## is_heap

Syntax:

        #include <algorithm>
        bool is_heap( iterator start, iterator end );
        bool is_heap( iterator start, iterator end, StrictWeakOrdering cmp );

The is_heap() function returns true if the given range [start,end) is a heap.

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

is_heap() runs in linear time.

Related Topics: make_heap, pop_heap, push_heap, sort_heap

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