|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--drasys.or.cont.BinomialHeap
A binomial heap implementation of a priority queue.
References:
Introduction to Algorithms
Thomas H. Cormen, et al / Hardcover / Published 1990
BinaryHeap,
PriorityQueue, Serialized Form| Constructor Summary | |
BinomialHeap(CompareI compare)
|
|
| Method Summary | |
void |
changePriority(PairI pelement,
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)
This is not needed with this queue and has no effect. |
PairI |
getHead()
Access the next element in the queue and leave the entry in the queue. |
PairI |
insert(java.lang.Object priority)
|
PairI |
insert(java.lang.Object priority,
java.lang.Object object)
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()
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public BinomialHeap(CompareI compare)
| Method Detail |
public int size()
PriorityQueueIpublic java.util.Enumeration elements()
PriorityQueueIpublic void removeAllElements()
PriorityQueueIpublic void ensureCapacity(int capacity)
public PairI getHead()
PriorityQueueIpublic PairI popHead()
PriorityQueueIpublic PairI insert(java.lang.Object priority)
PriorityQueueI
public PairI insert(java.lang.Object priority,
java.lang.Object object)
PriorityQueueIpublic void setCompare(CompareI compare)
public void changePriority(PairI pelement,
java.lang.Object priority)
throws InvalidPriorityException
PriorityQueueIpublic boolean check()
PriorityQueueI
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||