
public interface KNNHeap
DBIDUtil.newHeap(int)!| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the heap.
|
int |
getK()
Get the K parameter ("maxsize" internally).
|
double |
getKNNDistance()
Get the distance to the k nearest neighbor, or maxdist otherwise.
|
void |
insert(DoubleDBIDPair e)
Add a distance-id pair to the heap unless the distance is too large.
|
double |
insert(double distance,
DBIDRef id)
Add a distance-id pair to the heap unless the distance is too large.
|
boolean |
isEmpty()
Test if the heap is empty.
|
DoubleDBIDPair |
peek()
Peek at the largest element in the heap.
|
DoubleDBIDPair |
poll()
Poll the largest element from the heap.
|
int |
size()
Current size of heap.
|
KNNList |
toKNNList()
Serialize to a
KNNList. |
KNNList toKNNList()
KNNList. This empties the heap!int getK()
double getKNNDistance()
double insert(double distance,
DBIDRef id)
distance - Distance valueid - ID numbervoid insert(DoubleDBIDPair e)
e - Existing distance pairint size()
boolean isEmpty()
void clear()
DoubleDBIDPair poll()
toKNNList().DoubleDBIDPair peek()
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.