
E - Object typepublic class TiedTopBoundedUpdatableHeap<E> extends TopBoundedUpdatableHeap<E>
TopBoundedHeap, discarding elements
with the highest value. However, this variation keeps a list of tied
elements.Heap.UnorderedIter| Modifier and Type | Field and Description |
|---|---|
private List<E> |
ties
List to keep ties in.
|
maxsizeIN_TIES, index, NO_VALUEcomparator, queue, size| Constructor and Description |
|---|
TiedTopBoundedUpdatableHeap(int maxsize)
Constructor for Comparable objects.
|
TiedTopBoundedUpdatableHeap(int maxsize,
Comparator<? super E> comparator)
Constructor with comparator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the heap.
|
protected void |
handleOverflow(E e)
Handle an overflow in the structure.
|
void |
offerAt(int pos,
E e)
Offer element at the given position.
|
E |
peek()
Peek at the top element.
|
E |
poll()
Remove the top element.
|
int |
size()
Get the heap size.
|
compare, getMaxSizeadd, heapifyDownComparable, heapifyDownComparator, heapifyUpComparable, heapifyUpComparator, removeAt, removeObject, replaceTopElementcheckHeap, heapifyDown, heapifyUp, heapModified, isEmpty, resize, unorderedIterpublic TiedTopBoundedUpdatableHeap(int maxsize,
Comparator<? super E> comparator)
maxsize - Maximum size of heap (unless tied)comparator - Comparatorpublic TiedTopBoundedUpdatableHeap(int maxsize)
maxsize - Maximum size of heap (unless tied)public int size()
Heappublic void clear()
Heapclear in class UpdatableHeap<E>public void offerAt(int pos,
E e)
UpdatableHeapofferAt in class TopBoundedUpdatableHeap<E>pos - Positione - Elementpublic E poll()
Heappoll in class UpdatableHeap<E>protected void handleOverflow(E e)
TopBoundedUpdatableHeaphandleOverflow in class TopBoundedUpdatableHeap<E>e - Overflowing element.Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.