
class IntegerDBIDRange extends AbstractList<DBID> implements DBIDRange
| Modifier and Type | Class and Description |
|---|---|
protected class |
IntegerDBIDRange.DBIDItr
Iterator in ELKI/C++ style.
|
protected class |
IntegerDBIDRange.Itr
Iterator class.
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
len
Length value
|
protected int |
start
Start value
|
modCount| Modifier | Constructor and Description |
|---|---|
protected |
IntegerDBIDRange(int start,
int len)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
binarySearch(DBIDRef key)
Search for the position of the given key, assuming that the data set is
sorted.
|
boolean |
contains(DBIDRef o)
Test whether an ID is contained.
|
DBID |
get(int i)
Get the i'th entry (starting at 0)
|
int |
getOffset(DBIDRef dbid)
For storage array offsets.
|
DBIDIter |
iter()
Iterable
|
Iterator<DBID> |
iterator()
Classic iterator.
|
int |
size()
Size of the DBID "collection".
|
<T> T[] |
toArray(T[] a) |
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toStringprotected IntegerDBIDRange(int start,
int len)
start - Range startlen - Range lengthpublic int size()
ArrayDBIDssize in interface ArrayDBIDssize in interface DBIDssize in interface Collection<DBID>size in interface List<DBID>size in class AbstractCollection<DBID>public Iterator<DBID> iterator()
DBIDspublic DBIDIter iter()
ArrayDBIDsiter in interface ArrayDBIDsiter in interface DBIDspublic boolean contains(DBIDRef o)
DBIDspublic <T> T[] toArray(T[] a)
toArray in interface Collection<DBID>toArray in interface List<DBID>toArray in class AbstractCollection<DBID>public DBID get(int i)
ArrayDBIDsget in interface ArrayDBIDsget in interface List<DBID>get in class AbstractList<DBID>i - Indexpublic int getOffset(DBIDRef dbid)
public int binarySearch(DBIDRef 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 ArrayDBIDskey - Key to search for