protected static class KNNUtil.DBIDView extends Object implements ArrayDBIDs
Modifier and Type | Field and Description |
---|---|
(package private) KNNResult<?> |
parent
The true list.
|
Constructor and Description |
---|
KNNUtil.DBIDView(KNNResult<?> parent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
binarySearch(DBID key)
Deprecated.
|
boolean |
contains(DBID o)
Test whether an ID is contained.
|
DBID |
get(int i)
Get the i'th entry (starting at 0)
|
boolean |
isEmpty()
Test for an empty DBID collection.
|
DBIDIter |
iter()
Iterable
|
Iterator<DBID> |
iterator()
Retrieve Iterator access to the IDs.
|
int |
size()
Size of the DBID "collection".
|
final KNNResult<?> parent
public KNNUtil.DBIDView(KNNResult<?> parent)
parent
- Ownerpublic DBID get(int i)
ArrayDBIDs
get
in interface ArrayDBIDs
i
- Indexpublic Iterator<DBID> iterator()
DBIDs
public DBIDIter iter()
ArrayDBIDs
iter
in interface ArrayDBIDs
iter
in interface DBIDs
public int size()
ArrayDBIDs
size
in interface ArrayDBIDs
size
in interface DBIDs
public boolean contains(DBID o)
DBIDs
public boolean isEmpty()
DBIDs
@Deprecated public int binarySearch(DBID key)
binarySearch
in interface ArrayDBIDs
key
- Key to search for