priorityqueue
index
c:\users\pattis\workspace\courselib\priorityqueue.py

 
Classes
       
builtins.object
PriorityQueue

 
class PriorityQueue(builtins.object)
    Implements a Priority Queue data type: values are removed
  according to the highest priority value first rule.
 
  Methods defined here:
__add__(self, x)
Overload syntax: pq = pq + x is the same as pq.add(x)
__bool__(self)
Determine the truth of a priority queue: non-empty priority queues are True
__init__(self, inital_contents=[], key=<function <lambda>>, reverse=False)
Priority queue is constructed to store initial_contents (it can be any iterable),
  with key/reverse used for computing relative priorities (as in sorting).
__iter__(self)
Implement the constructor for the iterator protocol
__next__(self)
Implement next for the iterator protocol
__str__(self)
Return a string representation of a priority queue
add(self, v)
Add value v to the priority queue
clear(self)
Clear the priority queue
is_empty(self)
Return whether the priority queue is empty
merge(self, other)
Merge other (a PriorityQueue) with this one (clearing otherPriorityQueue)
peek(self)
Return (but do not remove) the highest priority value in the priority queue
remove(self)
Remove and return the highest priority value (by key/reverse) in the priority queue
size(self)
Return the number of values in the priority queue

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)