
public class IntegerDBIDKNNSubList extends Object implements IntegerDBIDKNNList
| Modifier and Type | Class and Description |
|---|---|
private class |
IntegerDBIDKNNSubList.Itr
Iterator for the sublist.
|
| Modifier and Type | Field and Description |
|---|---|
private IntegerDBIDKNNList |
inner
Wrapped inner result.
|
private int |
k
Parameter k.
|
private int |
size
Actual size, including ties.
|
| Constructor and Description |
|---|
IntegerDBIDKNNSubList(IntegerDBIDKNNList inner,
int k)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(DBIDRef o)
Test whether an ID is contained.
|
DoubleIntegerDBIDPair |
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.
|
boolean |
isEmpty()
Test for an empty DBID collection.
|
IntegerDBIDKNNSubList.Itr |
iter()
Get a DBID iterator (a more efficient API).
|
int |
size()
Size
|
private final int k
private final int size
private final IntegerDBIDKNNList inner
public IntegerDBIDKNNSubList(IntegerDBIDKNNList inner, int k)
inner - Inner instancek - k valuepublic int getK()
KNNListpublic DoubleIntegerDBIDPair get(int index)
KNNListget in interface DoubleDBIDListget in interface IntegerDBIDKNNListget in interface KNNListindex - Offsetpublic double getKNNDistance()
KNNListgetKNNDistance in interface KNNListpublic IntegerDBIDKNNSubList.Itr iter()
DBIDs
for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
DBID id = iter.getDBID();
}
iter in interface DBIDsiter in interface DoubleDBIDListiter in interface IntegerDBIDKNNListiter in interface IntegerDBIDspublic boolean contains(DBIDRef o)
DBIDspublic boolean isEmpty()
DBIDsCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.