stl_heap.h File Reference

#include <debug/debug.h>

Include dependency graph for stl_heap.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  std

Functions

template<typename RandomAccessIterator>
void push_heap (RandomAccessIterator first, RandomAccessIterator last)
 Push an element onto a heap.
template<typename RandomAccessIterator, typename Compare>
void push_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 Push an element onto a heap using comparison functor.
template<typename RandomAccessIterator>
void pop_heap (RandomAccessIterator first, RandomAccessIterator last)
 Pop an element off a heap.
template<typename RandomAccessIterator, typename Compare>
void pop_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 Pop an element off a heap using comparison functor.
template<typename RandomAccessIterator>
void make_heap (RandomAccessIterator first, RandomAccessIterator last)
 Construct a heap over a range.
template<typename RandomAccessIterator, typename Compare>
void make_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 Construct a heap over a range using comparison functor.
template<typename RandomAccessIterator>
void sort_heap (RandomAccessIterator first, RandomAccessIterator last)
 Sort a heap.
template<typename RandomAccessIterator, typename Compare>
void sort_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 Sort a heap using comparison functor.


Detailed Description

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

Definition in file stl_heap.h.


Function Documentation

template<typename RandomAccessIterator, typename Compare>
void std::make_heap RandomAccessIterator  first,
RandomAccessIterator  last,
Compare  comp
[inline]
 

Construct a heap over a range using comparison functor.

Parameters:
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 384 of file stl_heap.h.

template<typename RandomAccessIterator>
void std::make_heap RandomAccessIterator  first,
RandomAccessIterator  last
 

Construct a heap over a range.

Parameters:
first Start of heap.
last End of heap.
This operation makes the elements in [first,last) into a heap.

Definition at line 344 of file stl_heap.h.

Referenced by std::partial_sort(), std::partial_sort_copy(), and std::priority_queue< Type, Sequence, Compare >::priority_queue().

template<typename RandomAccessIterator, typename Compare>
void std::pop_heap RandomAccessIterator  first,
RandomAccessIterator  last,
Compare  comp
[inline]
 

Pop an element off a heap using comparison functor.

Parameters:
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 319 of file stl_heap.h.

template<typename RandomAccessIterator>
void std::pop_heap RandomAccessIterator  first,
RandomAccessIterator  last
[inline]
 

Pop an element off a heap.

Parameters:
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 253 of file stl_heap.h.

Referenced by std::priority_queue< Type, Sequence, Compare >::pop(), and std::sort_heap().

template<typename RandomAccessIterator, typename Compare>
void std::push_heap RandomAccessIterator  first,
RandomAccessIterator  last,
Compare  comp
[inline]
 

Push an element onto a heap using comparison functor.

Parameters:
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 189 of file stl_heap.h.

template<typename RandomAccessIterator>
void std::push_heap RandomAccessIterator  first,
RandomAccessIterator  last
[inline]
 

Push an element onto a heap.

Parameters:
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 141 of file stl_heap.h.

Referenced by std::priority_queue< Type, Sequence, Compare >::push().

template<typename RandomAccessIterator, typename Compare>
void std::sort_heap RandomAccessIterator  first,
RandomAccessIterator  last,
Compare  comp
 

Sort a heap using comparison functor.

Parameters:
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 448 of file stl_heap.h.

References std::pop_heap().

template<typename RandomAccessIterator>
void std::sort_heap RandomAccessIterator  first,
RandomAccessIterator  last
 

Sort a heap.

Parameters:
first Start of heap.
last End of heap.
This operation sorts the valid heap in the range [first,last).

Definition at line 422 of file stl_heap.h.

References std::pop_heap().

Referenced by std::partial_sort(), and std::partial_sort_copy().


Generated on Fri May 6 01:11:27 2005 for libstdc++-v3 Source by  doxygen 1.4.2