public abstract class TroveArrayDBIDs extends Object implements ArrayDBIDs
Modifier and Type | Class and Description |
---|---|
protected static class |
TroveArrayDBIDs.DBIDItr
Iterate over a Trove IntList, ELKI/C-style
|
Constructor and Description |
---|
TroveArrayDBIDs() |
Modifier and Type | Method and Description |
---|---|
int |
binarySearch(DBID key)
Search for the position of the given key, assuming that the data set is
sorted.
|
boolean |
contains(DBID o)
Test whether an ID is contained.
|
DBID |
get(int index)
Get the i'th entry (starting at 0)
|
protected abstract gnu.trove.list.TIntList |
getStore()
Get the array store
|
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".
|
protected abstract gnu.trove.list.TIntList getStore()
public Iterator<DBID> iterator()
DBIDs
public DBIDIter iter()
ArrayDBIDs
iter
in interface ArrayDBIDs
iter
in interface DBIDs
public DBID get(int index)
ArrayDBIDs
get
in interface ArrayDBIDs
index
- Indexpublic int size()
ArrayDBIDs
size
in interface ArrayDBIDs
size
in interface DBIDs
public boolean isEmpty()
DBIDs
public boolean contains(DBID o)
DBIDs
public int binarySearch(DBID key)
ArrayDBIDs
-(1+insertion position)
is returned, as
for Java Collections.binarySearch(java.util.List<? extends java.lang.Comparable<? super T>>, T)
binarySearch
in interface ArrayDBIDs
key
- Key to search for