|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--jds.collection.SkewHeap
SkewHeap - priority queue implemented using skew heap algorithms; for use with book Classic Data Structures in Java by Timothy A Budd, published by Addison-Wesley, 2001.
Enumeration,
Serializable, Serialized Form| Constructor Summary | |
SkewHeap(java.util.Comparator t)
initialize newly created heap |
|
| Method Summary | |
void |
addElement(java.lang.Object val)
add a new value to the collection |
java.util.Enumeration |
elements()
Yields enumerator for collection |
java.lang.Object |
getFirst()
yields the smallest element in collection |
boolean |
isEmpty()
Determines whether the collection is empty |
void |
mergeWith(SkewHeap right)
merge this heap with another |
void |
removeFirst()
removes the smallest element in collection |
int |
size()
Determines number of elements in collection |
void |
sort(Indexed data)
rearrange collection into asending order |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public SkewHeap(java.util.Comparator t)
t - comparator to be used to order values| Method Detail |
public boolean isEmpty()
public java.util.Enumeration elements()
Enumeration that will yield the elements of the collectionEnumerationpublic int size()
public void addElement(java.lang.Object val)
value - element to be inserted into collectionpublic java.lang.Object getFirst()
public void removeFirst()
public void mergeWith(SkewHeap right)
right - heap to be combined with current heappublic void sort(Indexed data)
data - the values to be ordered
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||