Modifier and Type | Class and Description |
---|---|
private class |
KNNUtil.KNNSubList.Itr
Iterator for the sublist.
|
Modifier and Type | Field and Description |
---|---|
private KNNResult<D> |
inner
Wrapped inner result.
|
private int |
k
Parameter k.
|
private int |
size
Actual size, including ties.
|
Constructor and Description |
---|
KNNUtil.KNNSubList(KNNResult<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.
|
DistanceDBIDResultIter<D> |
iter()
Get an iterator
|
int |
size()
Size
|
private final int k
private final int size
public int getK()
KNNResult
public DistanceDBIDPair<D> get(int index)
KNNResult
public D getKNNDistance()
KNNResult
getKNNDistance
in interface KNNResult<D extends Distance<D>>
public DistanceDBIDResultIter<D> iter()
DistanceDBIDResult
public boolean contains(DBIDRef o)
DBIDs
public boolean isEmpty()
DBIDs