ADC Home > Reference Library > Reference > Darwin > Miscellaneous User Space API Reference

 


stl_heap.h

Includes:

Introduction

This is an internal header file, included by other library headers. You should not attempt to use it directly.



Functions

make_heap(_RandomAccessIterator, _RandomAccessIterator)
make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare)
sort_heap(_RandomAccessIterator, _RandomAccessIterator)
sort_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare)

make_heap(_RandomAccessIterator, _RandomAccessIterator)


template<typename _RandomAccessIterator> void make_heap(
    _RandomAccessIterator __first,
    _RandomAccessIterator __last) 
Parameters
first
Start of heap.
last
End of heap. @ingroup heap

This operation makes the elements in [first,last) into a heap.
Discussion

@brief Construct a heap over a range.


make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare)


template<typename _RandomAccessIterator, typename _Compare> inline void make_heap(
    _RandomAccessIterator __first,
    _RandomAccessIterator __last, 
    _Compare __comp) 
Parameters
first
Start of heap.
last
End of heap.
comp
Comparison functor to use. @ingroup heap

This operation makes the elements in [first,last) into a heap. Comparisons are made using comp.
Discussion

@brief Construct a heap over a range using comparison functor.


sort_heap(_RandomAccessIterator, _RandomAccessIterator)


template<typename _RandomAccessIterator> void sort_heap(
    _RandomAccessIterator __first,
    _RandomAccessIterator __last) 
Parameters
first
Start of heap.
last
End of heap. @ingroup heap

This operation sorts the valid heap in the range [first,last).
Discussion

@brief Sort a heap.


sort_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare)


template<typename _RandomAccessIterator, typename _Compare> void sort_heap(
    _RandomAccessIterator __first,
    _RandomAccessIterator __last, 
    _Compare __comp) 
Parameters
first
Start of heap.
last
End of heap.
comp
Comparison functor to use. @ingroup heap

This operation sorts the valid heap in the range [first,last). Comparisons are made using comp.
Discussion

@brief Sort a heap using comparison functor.

Typedefs


pop_heap


template<typename _RandomAccessIterator> inline void pop_heap(
    _RandomAccessIterator __first,
    _RandomAccessIterator __last) 
Discussion

@brief Pop an element off a heap.


pop_heap


template<typename _RandomAccessIterator, typename _Compare> inline void pop_heap(
    _RandomAccessIterator __first, 
    _RandomAccessIterator __last,
    _Compare __comp) 
Discussion

@brief Pop an element off a heap using comparison functor.


push_heap


template<typename _RandomAccessIterator> inline void push_heap(
    _RandomAccessIterator __first,
    _RandomAccessIterator __last) 
Discussion

@brief Push an element onto a heap.


push_heap


template<typename _RandomAccessIterator, typename _Compare> inline void push_heap(
    _RandomAccessIterator __first,
    _RandomAccessIterator __last, 
    _Compare __comp) 
Discussion

@brief Push an element onto a heap using comparison functor.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2006-06-20