
class IntegerDBIDRange extends Object implements DBIDRange
| Modifier and Type | Class and Description | 
|---|---|
protected static class  | 
IntegerDBIDRange.DBIDItr
Iterator in ELKI/C++ style. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
protected int | 
len
Length value. 
 | 
protected int | 
start
Start value. 
 | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
IntegerDBIDRange(int start,
                int len)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
assignVar(int index,
         DBIDVar var)
Assign a DBID variable the value of position  
index. | 
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)
 
 If possible, use an  
DBIDArrayIter via ArrayDBIDs.iter() instead! | 
int | 
getOffset(DBIDRef dbid)
For storage array offsets. 
 | 
boolean | 
isEmpty()
Test for an empty DBID collection. 
 | 
DBIDArrayIter | 
iter()
Iterable 
 | 
int | 
mapDBIDToOffset(DBIDRef dbid)
Map a DBID to an array offset. 
 | 
int | 
size()
Size of the DBID "collection". 
 | 
String | 
toString()  | 
protected IntegerDBIDRange(int start,
                int len)
start - Range startlen - Range lengthpublic int size()
ArrayDBIDssize in interface ArrayDBIDssize in interface DBIDspublic boolean isEmpty()
DBIDspublic DBIDArrayIter iter()
ArrayDBIDsiter in interface ArrayDBIDsiter in interface DBIDspublic boolean contains(DBIDRef o)
DBIDspublic DBID get(int i)
ArrayDBIDsDBIDArrayIter via ArrayDBIDs.iter() instead!get in interface ArrayDBIDsi - Indexpublic int getOffset(DBIDRef dbid)
public void assignVar(int index,
             DBIDVar var)
ArrayDBIDsindex.assignVar in interface ArrayDBIDsindex - Positionvar - Variable to assign the value to.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 forpublic int mapDBIDToOffset(DBIDRef dbid)
DataStoreIDMapmapDBIDToOffset in interface DataStoreIDMapdbid - DBIDid >= 0