Standard C++ Library Reference ISO/IEC (VERSION3)
A sequence of elements designated by iterators in the range [first, last) is ``a heap
ordered by operator<'' if:
For each N in the range [1, last - first) the predicate !(*first <
*(first + N)) is true. (The first element is the largest.)
●
It is possible to insert (push_heap) a new element or remove (pop_heap) the largest
element in logarithmic time and preserve the heap discipline in the resulting sequence.
●
Its internal structure is otherwise known only to the template functions make_heap,
pop_heap, and push_heap. As with an ordered sequence, the predicate function
operator<, or any replacement for it, must not alter either of its operands, and it must impose
a strict weak ordering on the operands it compares. It must yield the same boolresult every
time it is evaluated, and it must yield the same result if a copy of either operand is substituted
for the operand.
See also the Table of Contents and the Index.
Copyright © 1992-2001 by P.J. Plauger. All rights reserved.