|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mhhe.clrs2e.MergeableHeap
Abstract class for mergeable heap data structures, defined on page 455 of Introduction to Algorithms, Second edition.
The constructor of any implementing class should create an empty mergeable heap.
Constructor Summary | |
MergeableHeap()
|
Method Summary | |
abstract com.mhhe.clrs2e.DynamicSetElement |
extractMin()
Removes and returns the smallest dynamic set element in the mergeable heap. |
abstract java.lang.Object |
insert(com.mhhe.clrs2e.DynamicSetElement x)
Inserts a dynamic set element into the mergeable heap. |
abstract com.mhhe.clrs2e.DynamicSetElement |
minimum()
Returns the dynamic set element whose key is minimum. |
abstract com.mhhe.clrs2e.MergeableHeap |
union(com.mhhe.clrs2e.MergeableHeap h2)
Creates a new mergeable heap that contains all the elements of two mergeable heaps. |
static com.mhhe.clrs2e.MergeableHeap |
union(com.mhhe.clrs2e.MergeableHeap h1,
com.mhhe.clrs2e.MergeableHeap h2)
Creates a new mergeable heap that contains all the elements of two mergeable heaps. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MergeableHeap()
Method Detail |
public abstract java.lang.Object insert(com.mhhe.clrs2e.DynamicSetElement x)
x
- The dynamic set element to be inserted.
public abstract com.mhhe.clrs2e.DynamicSetElement minimum()
public abstract com.mhhe.clrs2e.DynamicSetElement extractMin()
public static com.mhhe.clrs2e.MergeableHeap union(com.mhhe.clrs2e.MergeableHeap h1, com.mhhe.clrs2e.MergeableHeap h2)
h1
- One of the mergeable heaps to be merged.h2
- The other mergeable heap to be merged.
h1
and h2
.public abstract com.mhhe.clrs2e.MergeableHeap union(com.mhhe.clrs2e.MergeableHeap h2)
h2
- The mergeable heap to be merged with this one.
h2
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |