PQueue Class Reference

#include <PQueue.h>

List of all members.

Public Member Functions

 PQueue (int maxNumNodes, int maxGain)
 ~PQueue ()
void insert (GNode node, int gain)
 insert a node with its gain
void remove (GNode value, int gain)
 delete a node from the queue
void update (GNode value, int oldgain, int newgain)
 after changing the gain of a node, its position in the queue has to be updated
GNode getMax ()
 return the node with the max gain in the queue
int size ()
void reset ()
 reset the queue

Private Attributes

SuperPQueue< GNode > * internalQueue

Static Private Attributes

static const int PLUS_GAINSPAN = 500

Constructor & Destructor Documentation

PQueue::PQueue ( int  maxNumNodes,
int  maxGain 
) [inline]
PQueue::~PQueue (  )  [inline]

Member Function Documentation

GNode PQueue::getMax (  )  [inline]

return the node with the max gain in the queue

void PQueue::insert ( GNode  node,
int  gain 
) [inline]

insert a node with its gain

void PQueue::remove ( GNode  value,
int  gain 
) [inline]

delete a node from the queue

void PQueue::reset (  )  [inline]

reset the queue

int PQueue::size (  )  [inline]
void PQueue::update ( GNode  value,
int  oldgain,
int  newgain 
) [inline]

after changing the gain of a node, its position in the queue has to be updated


Member Data Documentation

const int PQueue::PLUS_GAINSPAN = 500 [static, private]

The documentation for this class was generated from the following file:
Generated on Tue Aug 2 11:51:28 2011 for Galois by  doxygen 1.6.3