V
- Value typepublic interface DoubleObjectHeap<V>
Modifier and Type | Interface and Description |
---|---|
static interface |
DoubleObjectHeap.UnsortedIter<V>
Unsorted iterator - in heap order.
|
Modifier and Type | Method and Description |
---|---|
void |
add(double key,
V val)
Add a key-value pair to the heap
|
void |
add(double key,
V val,
int k)
Add a key-value pair to the heap if it improves the top.
|
void |
clear()
Clear the heap contents.
|
boolean |
isEmpty()
Is the heap empty?
|
double |
peekKey()
Get the current top key
|
V |
peekValue()
Get the current top value
|
void |
poll()
Remove the first element
|
void |
replaceTopElement(double key,
V val)
Combined operation that removes the top element, and inserts a new element
instead.
|
int |
size()
Query the size
|
DoubleObjectHeap.UnsortedIter<V> |
unsortedIter()
Get an unsorted iterator to inspect the heap.
|
void add(double key, V val)
key
- Keyval
- Valuevoid add(double key, V val, int k)
key
- Keyval
- Valuek
- Desired maximum sizevoid replaceTopElement(double key, V val)
key
- Key of new elementval
- Value of new elementdouble peekKey()
V peekValue()
void poll()
void clear()
int size()
boolean isEmpty()
true
when the size is 0.DoubleObjectHeap.UnsortedIter<V> unsortedIter()
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.