public class BinaryHeap<E extends java.lang.Comparable> extends java.lang.Object implements PriorityQueue<E>
Constructor and Description |
---|
BinaryHeap() |
BinaryHeap(int initialCapacity) |
BinaryHeap(int initialCapacity, oracle.spatial.network.lod.BinaryHeap.IndexKeeper indexKeeper) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Empties the queue.
|
E |
deleteMin()
Deletes the minimum element in the queue.
|
E |
findMin()
Finds the minimum element in the queue.
|
E |
getElementAtIndex(int index) |
void |
insert(E element)
Inserts an element into the queue.
|
boolean |
isEmpty()
Determines whether the queue is empty or not.
|
int |
size()
Returns the size of the queue.
|
java.lang.String |
toString() |
public BinaryHeap()
public BinaryHeap(int initialCapacity)
public BinaryHeap(int initialCapacity, oracle.spatial.network.lod.BinaryHeap.IndexKeeper indexKeeper)
public void insert(E element)
PriorityQueue
insert
in interface PriorityQueue<E extends java.lang.Comparable>
public E deleteMin()
PriorityQueue
deleteMin
in interface PriorityQueue<E extends java.lang.Comparable>
public boolean isEmpty()
PriorityQueue
isEmpty
in interface PriorityQueue<E extends java.lang.Comparable>
public E getElementAtIndex(int index)
public void clear()
PriorityQueue
clear
in interface PriorityQueue<E extends java.lang.Comparable>
public int size()
PriorityQueue
size
in interface PriorityQueue<E extends java.lang.Comparable>
public E findMin()
PriorityQueue
findMin
in interface PriorityQueue<E extends java.lang.Comparable>
public java.lang.String toString()
toString
in class java.lang.Object