class documentation

class SortedPriorityQueue(PriorityQueueBase):

View In Hierarchy

A min-oriented priority queue implemented with a sorted list.

Method __init__ Create a new empty Priority Queue.
Method __len__ Return the number of items in the priority queue.
Method add Add a key-value pair.
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.
Instance Variable _data Undocumented

Inherited from PriorityQueueBase:

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

Create a new empty Priority Queue.

def __len__(self):

Return the number of items in the priority queue.

def add(self, key, value):

Add a key-value pair.

def min(self):

Return but do not remove (k,v) tuple with minimum key.

Raise Empty exception if empty.

def remove_min(self):

Remove and return (k,v) tuple with minimum key.

Raise Empty exception if empty.

_data =

Undocumented