
| Modifier and Type | Class and Description |
|---|---|
private class |
KNNSubList.Itr
Iterator for the sublist.
|
| Modifier and Type | Field and Description |
|---|---|
private KNNList<D> |
inner
Wrapped inner result.
|
private int |
k
Parameter k.
|
private int |
size
Actual size, including ties.
|
| Constructor and Description |
|---|
KNNSubList(KNNList<D> inner,
int k)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(DBIDRef o)
Test whether an ID is contained.
|
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.
|
boolean |
isEmpty()
Test for an empty DBID collection.
|
DistanceDBIDListIter<D> |
iter()
Get an iterator
|
int |
size()
Size
|
private final int k
private final int size
public int getK()
KNNListpublic DistanceDBIDPair<D> get(int index)
KNNListpublic D getKNNDistance()
KNNListgetKNNDistance in interface KNNList<D extends Distance<D>>public DistanceDBIDListIter<D> iter()
DistanceDBIDListpublic boolean contains(DBIDRef o)
DBIDspublic boolean isEmpty()
DBIDs