Previous topic

bioa.PQueue.decrease_key

Next topic

bioa.PQueue.add_node

This Page

bioa.PQueue.__init__

PQueue.__init__(data, behave='min')

Initializes a priority queue.

Parameters :

data : list

List of the form (weight, PQueue.OK, node)

behave : str (optional, default=”min”)

Specifiy the behavior of the priority queue. Should either be ‘min’ or ‘max’.

Returns :

pqueue : PQueue

Instance of a priority queue.