|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.cont.BinaryHeap
References:
Introduction to Algorithms
Thomas H. Cormen, et al / Hardcover / Published 1990
BinomialHeap
,
PriorityQueue
, Serialized FormConstructor Summary | |
BinaryHeap(CompareI compare)
|
|
BinaryHeap(CompareI compare,
int capacity)
|
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. |
PairI |
elementAt(int i)
|
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)
|
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 BinaryHeap(CompareI compare)
public BinaryHeap(CompareI compare, int capacity)
Method Detail |
public PairI elementAt(int i)
public int size()
PriorityQueueI
public void removeAllElements()
PriorityQueueI
public void ensureCapacity(int capacity)
public java.util.Enumeration elements()
PriorityQueueI
public boolean check()
PriorityQueueI
public void changePriority(PairI pelement, java.lang.Object priority) throws InvalidPriorityException
PriorityQueueI
public PairI getHead()
PriorityQueueI
public PairI popHead()
PriorityQueueI
public void setCompare(CompareI compare)
public PairI insert(java.lang.Object priority)
PriorityQueueI
public PairI insert(java.lang.Object priority, java.lang.Object object)
PriorityQueueI
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |