|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface used by all algorithms to use priority queues.
BinaryHeap
,
BinomialHeap
,
PriorityQueue
Method Summary | |
void |
changePriority(PairI element,
java.lang.Object priority)
Change the priority of a element in the queue. |
boolean |
check()
Check the integrity of the internal data structures. |
java.util.Enumeration |
elements()
Get an enumerator to access all the elements in random order. |
void |
ensureCapacity(int capacity)
Ensure that the queue can hold this many elements. |
PairI |
getHead()
Access the next element in the queue and leave the entry in the queue. |
PairI |
insert(java.lang.Object priority,
java.lang.Object value)
Insert a new element into the queue, with separate priority and value objects. |
PairI |
popHead()
Access the next element in the queue and remove the entry from the queue. |
void |
removeAllElements()
Remove all elements from the queue. |
void |
setCompare(CompareI compare)
Sets a new comparison function. |
int |
size()
|
Method Detail |
public int size()
public void removeAllElements()
public void ensureCapacity(int capacity)
public java.util.Enumeration elements()
public boolean check()
public void changePriority(PairI element, java.lang.Object priority) throws InvalidPriorityException
public PairI getHead()
public PairI popHead()
public PairI insert(java.lang.Object priority, java.lang.Object value)
public void setCompare(CompareI compare)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |