Project Outline
«
SmilText JS

Class cwi.adt.PriorityQueue

Defined in: cwi.adt.js.

Constructor Summary
new cwi.adt.PriorityQueue () PriorityQueue Implementation
Method Summary
push(w, d) Insert a given element in the PriorityQueue based on its weight.
pop() Remove and return the first element of the PriorityQueue.
lookFirst() Return the weight of the first element and the PriorityQueue keeps unchanged.
clear() Remove all elements of the PriorityQueue.
getSize() Return the number of elements of the PriorityQueue.
isEmpty() Return true if the PriorityQueue is empty, otherwise, false.
toString() Return the string representation of the PriorityQueue.
merge(q) Add a given queue after the current queue.
Constructor Detail
new cwi.adt.PriorityQueue()
PriorityQueue Implementation

Author: Rodrigo Laiola Guimaraes.

									
									
									
										
										
										
										
										
										
										
					
								
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
pop() : Object
Remove and return the first element of the PriorityQueue.

										
									
Returns:
{Object}
lookFirst() : number
Return the weight of the first element and the PriorityQueue keeps unchanged.

										
									
Returns:
{number}
clear()
Remove all elements of the PriorityQueue.

										
									
getSize() : integer
Return the number of elements of the PriorityQueue.

										
									
Returns:
{integer}
isEmpty() : boolean
Return true if the PriorityQueue is empty, otherwise, false.

										
									
Returns:
{boolean}
toString() : string
Return the string representation of the PriorityQueue.

										
									
Returns:
{string}
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
Documentation generated by JsDoc Toolkit 2.3.2 on Mon Nov 09 2009 18:20:41 GMT+0100 (CET)