Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

PriorityQueue< Data > Class Template Reference

A templated priority queue.

#include <PriorityQueue.h>

List of all members.

Public Member Functions

 PriorityQueue (int MaxElements, int MaxRating, int GrowBy, bool IsAscending)
 Constructor.
 ~PriorityQueue ()
 Destructor.
void Push (Data *Item, int Rating)
 Push an item onto the queue.
Data * Pop ()
 Pop the next item off the queue.
bool IsEmpty ()
 Determines if queue is empty.

Private Attributes

int m_MaxSize
 Max size of queue.
int m_CurrentSize
 Current size of queue.
PriorityQueueElement< Data > * m_Elements
 pointer to elements in queue
int m_MaxRating
 biggest element possible
int m_GrowBy
 how big to grow queue if filled
bool m_IsAscendingHeap
 sort heap with maximum scoring elements first


Detailed Description

template<class Data>
class PriorityQueue< Data >

Definition at line 28 of file PriorityQueue.h.


Member Function Documentation

template<class Data>
bool PriorityQueue< Data >::IsEmpty  ) 
 

Returns:
Whether or not queue is empty

Definition at line 243 of file PriorityQueue.h.

References PriorityQueue< Data >::m_CurrentSize.

Referenced by PriorityQueue< Data >::Pop().

template<class Data>
Data * PriorityQueue< Data >::Pop  ) 
 

Returns:
The item off the queue

Definition at line 167 of file PriorityQueue.h.

References PriorityQueue< Data >::IsEmpty(), PriorityQueue< Data >::m_CurrentSize, PriorityQueue< Data >::m_Elements, PriorityQueue< Data >::m_IsAscendingHeap, PriorityQueueElement< Data >::m_Item, PriorityQueueElement< Data >::m_Rating, PQ_FIRST_ENTRY, and PQ_LEFT_CHILD_INDEX.

Referenced by FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::Resume(), and FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::Solve().

template<class Data>
void PriorityQueue< Data >::Push Data *  Item,
int  Rating
 

Parameters:
Item to be put on the queue
Rating of the item

Definition at line 106 of file PriorityQueue.h.

References PriorityQueue< Data >::m_CurrentSize, PriorityQueue< Data >::m_Elements, PriorityQueue< Data >::m_GrowBy, PriorityQueue< Data >::m_IsAscendingHeap, PriorityQueue< Data >::m_MaxRating, PriorityQueue< Data >::m_MaxSize, PQ_FIRST_ENTRY, and PQ_PARENT_INDEX.

Referenced by FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::Resume(), and FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::Solve().


The documentation for this class was generated from the following file:
Generated on Sat Nov 5 11:20:17 2005 for Cpp Freecell Solver by  doxygen 1.4.4