class documentation

class AdaptableHeapPriorityQueue(HeapPriorityQueue):

View In Hierarchy

A locator-based priority queue implemented with a binary heap.

Class Locator Token for locating an entry of the priority queue.
Method add Add a key-value pair and return a Locator for the new entry.
Method remove Remove and return the (k,v) pair identified by Locator loc.
Method update Update the key and value for the entry identified by Locator loc.
Method _bubble Undocumented
Method _swap Swap the items at indices i and j of array.
Method _validate Undocumented

Inherited from HeapPriorityQueue:

Method __init__ Create a new priority queue.
Method __len__ Return the number of items in the priority queue.
Method min Return but do not remove (k,v) tuple with minimum key.
Method remove_min Remove and return (k,v) tuple with minimum key.
Method _downheap Undocumented
Method _has_left Undocumented
Method _has_right Undocumented
Method _heapify Undocumented
Method _left Undocumented
Method _parent Undocumented
Method _right Undocumented
Method _upheap Undocumented
Instance Variable _data Undocumented

Inherited from PriorityQueueBase (via HeapPriorityQueue):

Method is_empty Return True if the priority queue is empty.
Class _Item Lightweight composite to store priority queue items.
def add(self, key, value):

Add a key-value pair and return a Locator for the new entry.

def remove(self, loc):

Remove and return the (k,v) pair identified by Locator loc.

def update(self, loc, newkey, newvalue):

Update the key and value for the entry identified by Locator loc.

def _bubble(self, j):

Undocumented

def _swap(self, i, j):

Swap the items at indices i and j of array.

def _validate(self, loc):

Undocumented