|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.rollerjm.graph.Dijkstra.PriorityQueue
Title: graphs
Description: inner class of Dijkstra used by the Dijkstra's algorithm to choose the shortest vertex (the one whose priority is the lowest !)
Copyright: Copyright (c) 2002
Company:
Nested Class Summary | |
(package private) class |
Dijkstra.PriorityQueue.QueueElement
Title: graphs |
Field Summary | |
private java.util.TreeSet |
queue
the queue is implemented by a TreeSet because it includes a sort algorithm ! |
Constructor Summary | |
Dijkstra.PriorityQueue()
|
Method Summary | |
void |
clear()
Remove all the elements of the queue |
java.lang.Object |
dequeueLowestPriorityElement()
|
int |
getSize()
|
void |
insert(java.lang.Object element,
int priority)
|
boolean |
isEmpty()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.TreeSet queue
Constructor Detail |
public Dijkstra.PriorityQueue()
Method Detail |
public void clear()
public boolean isEmpty()
public int getSize()
public void insert(java.lang.Object element, int priority)
element
- any object !priority
- should be >= 0public java.lang.Object dequeueLowestPriorityElement()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |