FakeHeap< T > Class Template Reference

#include <fakeheap.H>

Inheritance diagram for FakeHeap< T >:

Inheritance graph
[legend]
Collaboration diagram for FakeHeap< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void clear ()
bool empty () const
void sort (void)
void push (const T &x)
void pop (void)
const T & top (void) const


Detailed Description

template<class T>
class FakeHeap< T >

This template class provides an interface much like a priority queue, and it is intended to be used in this manner but with some restrictions and extensions.

Implementation details are hidden to provide an abstract template class for various fast implementations.

Remarks:
Of course you could use a simple vector for these operations, too, but then the interface would be different; and FakeHeap was designed to replace priority queues in a manner that you can easily switch between these abstract data types. (The only reason for the existence of FakeHeap is that it produces a practical speedup compared to priority queues.)

Definition at line 58 of file fakeheap.H.


Member Function Documentation

template<class T>
void FakeHeap< T >::clear (  )  [inline]

Reimplemented from std::vector< T >.

Definition at line 81 of file fakeheap.H.

References std::vector< _Tp, _Alloc >::clear().

Here is the call graph for this function:

template<class T>
bool FakeHeap< T >::empty (  )  const [inline]

Reimplemented from std::vector< T >.

Definition at line 85 of file fakeheap.H.

References std::vector< _Tp, _Alloc >::empty().

Here is the call graph for this function:

template<class T>
void FakeHeap< T >::sort ( void   )  [inline]

Definition at line 87 of file fakeheap.H.

References std::sort(), and sort().

Here is the call graph for this function:

template<class T>
void FakeHeap< T >::push ( const T &  x  )  [inline]

Definition at line 96 of file fakeheap.H.

References std::cerr, endl(), and sort().

Here is the call graph for this function:

template<class T>
void FakeHeap< T >::pop ( void   )  [inline]

Definition at line 109 of file fakeheap.H.

References std::cerr, endl(), and std::vector< _Tp, _Alloc >::pop_back().

Here is the call graph for this function:

template<class T>
const T& FakeHeap< T >::top ( void   )  const [inline]

Definition at line 121 of file fakeheap.H.

References std::vector< _Tp, _Alloc >::back(), std::cerr, and endl().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Wed Nov 7 23:31:52 2007 for Qsieve by  doxygen 1.5.4