public interface KNNList extends DoubleDBIDList
for (DistanceDBIDResultIter<D> iter = result.iter(); iter.valid(); iter.advance()) {
// You can get the distance via: iter.getDistance();
// Or use iter just like any other DBIDRef
}
If you are only interested in the IDs of the objects, the following is also
sufficient:
for (DBIDIter<D> iter = result.iter(); iter.valid(); iter.advance()) {
// Use iter just like any other DBIDRef
}
Modifier and Type | Method and Description |
---|---|
DoubleDBIDPair |
get(int index)
Direct object access.
|
int |
getK()
Get the K parameter (note: this may be less than the size of the list!)
|
double |
getKNNDistance()
Get the distance to the k nearest neighbor, or maxdist otherwise.
|
int |
size()
Size
|
iter
int size()
size
in interface DBIDs
size
in interface DoubleDBIDList
int getK()
DoubleDBIDPair get(int index)
get
in interface DoubleDBIDList
index
- double getKNNDistance()
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.