Class cwi.adt.PriorityQueue
Defined in: cwi.adt.js.
Constructor Summary
Method Summary
Constructor Detail
Method Detail
push(w, d)
Insert a given element in the PriorityQueue based on its weight.
Parameters:
{number} | w | Element weight |
{Object} | d | Element data |
lookFirst()
: number
Return the weight of the first element and the PriorityQueue keeps unchanged.
Returns:
{number} |
merge(q)
Add a given queue after the current queue.
Parameters:
{cwi.adt.PriorityQueue} | q | the priority queue that will be added after the current queue |