public class DoubleHeap
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
DoubleHeap() |
DoubleHeap(double[] keys,
java.lang.Object[] objects,
int numElem) |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Object elem,
double key)
Adds an element to the heap with the given key.
|
void |
clear() |
java.lang.Object |
extractMin()
Removes the minimum element and its key from the heap, and returns the minimum element.
|
double |
getMinKey()
Returns the key value of the current min element.
|
boolean |
isEmpty() |
public DoubleHeap()
public DoubleHeap(double[] keys, java.lang.Object[] objects, int numElem)
public double getMinKey()
public java.lang.Object extractMin()
public void add(java.lang.Object elem, double key)
public boolean isEmpty()
public void clear()