Go to the documentation of this file.
38 #ifndef vtkPriorityQueue_h
39 #define vtkPriorityQueue_h
41 #include "vtkCommonCoreModule.h"
146 if ( id <= this->ItemLocation->
GetMaxId() &&
147 (loc=this->ItemLocation->GetValue(
id)) != -1 )
158 if ( id <= this->ItemLocation->GetMaxId() &&
159 (loc=this->ItemLocation->GetValue(
id)) != -1 )
161 return this->Array[loc].priority;
168 if ( this->MaxId < 0 )
181 if ( this->MaxId < 0 )
double GetPriority(vtkIdType id)
Get the priority of an entry in the queue with specified id.
vtkIdType GetNumberOfItems()
Return the number of items in this queue.
void Allocate(const vtkIdType sz, const vtkIdType ext=1000)
Allocate initial space for priority queue.
a list of ids arranged in priority order
abstract base class for most VTK objects
vtkIdType GetMaxId()
What is the maximum id currently in the array.
void Reset()
Empty the queue but without releasing memory.
a simple class to control print indentation
void Insert(double priority, vtkIdType id)
Insert id with priority specified.
vtkIdType Pop(vtkIdType location=0)
Same as above but simplified for easier wrapping into interpreted languages.
dynamic, self-adjusting array of vtkIdType
vtkIdType Peek(vtkIdType location, double &priority)
Peek into the queue without actually removing anything.
~vtkPriorityQueue() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType Pop(vtkIdType location, double &priority)
Removes item at specified location from tree; then reorders and balances tree.
static vtkPriorityQueue * New()
Instantiate priority queue with default size and extension size of 1000.