|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractQueue<E> de.lmu.ifi.dbs.elki.utilities.datastructures.heap.Heap<O> de.lmu.ifi.dbs.elki.utilities.datastructures.heap.UpdatableHeap<O>
O
- object typepublic class UpdatableHeap<O>
A heap as used in OPTICS that allows updating entries.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.lmu.ifi.dbs.elki.utilities.datastructures.heap.Heap |
---|
Heap.Itr |
Field Summary | |
---|---|
private HashMap<O,Integer> |
index
Holds the indices in the heap of each element. |
private static long |
serialVersionUID
Serial version |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.datastructures.heap.Heap |
---|
modCount, size |
Constructor Summary | |
---|---|
UpdatableHeap()
Simple constructor with default size. |
|
UpdatableHeap(Comparator<? super O> comparator)
Constructor with comparator |
|
UpdatableHeap(int size)
Constructor with predefined size. |
|
UpdatableHeap(int size,
Comparator<? super O> comparator)
Constructor with predefined size and comparator |
Method Summary | |
---|---|
void |
clear()
|
boolean |
offer(O e)
|
O |
poll()
|
protected void |
putInQueue(int pos,
Object e)
Put an element into the queue at a given position. |
protected O |
removeAt(int pos)
Remove the element at the given position. |
O |
removeObject(O e)
Remove the given object from the queue. |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.datastructures.heap.Heap |
---|
castQueueElement, compare, compareExternal, compareExternalExternal, contains, heapifyDown, heapifyUp, heapifyUpParent, iterator, peek, size, swap, toSortedArrayList |
Methods inherited from class java.util.AbstractQueue |
---|
add, addAll, element, remove |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Field Detail |
---|
private static final long serialVersionUID
private HashMap<O,Integer> index
Constructor Detail |
---|
public UpdatableHeap()
public UpdatableHeap(int size)
size
- Sizepublic UpdatableHeap(Comparator<? super O> comparator)
comparator
- Comparatorpublic UpdatableHeap(int size, Comparator<? super O> comparator)
size
- Sizecomparator
- ComparatorMethod Detail |
---|
public void clear()
clear
in interface Collection<O>
clear
in class Heap<O>
public boolean offer(O e)
offer
in interface Queue<O>
offer
in class Heap<O>
protected void putInQueue(int pos, Object e)
Heap
putInQueue
in class Heap<O>
pos
- Indexe
- Elementprotected O removeAt(int pos)
Heap
removeAt
in class Heap<O>
pos
- Element position.public O removeObject(O e)
e
- Obejct to remove
public O poll()
poll
in interface Queue<O>
poll
in class Heap<O>
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |