
D - Distance typepublic interface KNNResult<D extends Distance<D>> extends DistanceDBIDResult<D>
 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 | 
|---|---|
| DistanceDBIDPair<D> | get(int index)Direct object access. | 
| int | getK()Get the K parameter (note: this may be less than the size of the list!) | 
| D | getKNNDistance()Get the distance to the k nearest neighbor, or maxdist otherwise. | 
| int | size()Size | 
iterint size()
int getK()
DistanceDBIDPair<D> get(int index)
get in interface DistanceDBIDResult<D extends Distance<D>>index - D getKNNDistance()