|
|||||||||
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 FormConstructor 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()
PriorityQueueI
public java.util.Enumeration elements()
PriorityQueueI
public void removeAllElements()
PriorityQueueI
public void ensureCapacity(int capacity)
public PairI getHead()
PriorityQueueI
public PairI popHead()
PriorityQueueI
public PairI insert(java.lang.Object priority)
PriorityQueueI
public PairI insert(java.lang.Object priority, java.lang.Object object)
PriorityQueueI
public void setCompare(CompareI compare)
public void changePriority(PairI pelement, java.lang.Object priority) throws InvalidPriorityException
PriorityQueueI
public boolean check()
PriorityQueueI
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |