pygraph.algorithms.utils.priority_queue

Package pygraph :: Package algorithms :: Module utils :: Class priority_queue |

# Class priority_queue

Priority queue.

Instance Methods
__init__(self, list=`[``]`) |
__contains__(self, item) |
__len__(self) |
empty(self) |
insert(self, item, priority) Insert item into the queue, with the given priority. |
pop(self) Return the item with the lowest priority, and remove it from the queue. |
peek(self) Return the item with the lowest priority. |
discard(self, item) |

Method Details

### peek(self) |
Return the item with the lowest priority. The queue is unchanged.