| Home | Trees | Indices | Help |
|---|
|
|
A priority queue based on a heap.
attributes:
heap: A heap-ordered list that holds objects in the
queue
type: list
entry_finder: A (map) dictionary for finding items in the heap
counter: A unique sequence generator
size: Number of items in the queue
methods:
__init__(self): constructor of the class
isEmpty(self): returns True if the queue is empty, False
otherwise
push(self,key,item,priority): inserts item with given key and
priority into the queue
pop(self,index): removes item with index from the queue
if no item is specified or removes the given
item if item is specified
size(self): returns the size of the queue
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see help(type(x)) for signature
|
Remove and return the lowest priority task. Raise KeyError if empty. |
Mark an existing task as REMOVED. Raise KeyError if not found. |
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Fri Mar 28 15:03:23 2014 | http://epydoc.sourceforge.net |