
class IntegerDBIDVar extends Object implements DBIDVar, IntegerDBIDs
| Modifier and Type | Class and Description |
|---|---|
protected class |
IntegerDBIDVar.Itr
Pseudo iterator for DBIDs interface.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
id
The actual value.
|
| Modifier | Constructor and Description |
|---|---|
protected |
IntegerDBIDVar()
Constructor.
|
protected |
IntegerDBIDVar(DBIDRef val)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
DBIDVar |
assignVar(int i,
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.
|
DBIDVar |
from(DBIDDataStore store,
DBIDRef ref)
Update variable from a data store.
|
DBID |
get(int i)
Deprecated.
|
int |
internalGetIndex()
Get the internal index.
|
protected void |
internalSetIndex(int i)
Internal set to integer.
|
boolean |
isEmpty()
Test for an empty DBID collection.
|
boolean |
isSet()
Test if the variable is well-defined.
|
IntegerDBIDVar.Itr |
iter()
Iterable
|
void |
set(DBIDRef ref)
Assign a new value for the reference.
|
void |
setFirst(DBIDPair pair)
Assign the first pair member to this variable.
|
void |
setSecond(DBIDPair pair)
Assign the second pair member to this variable.
|
int |
size()
Size of the DBID "collection".
|
ArrayDBIDs |
slice(int begin,
int end)
Slice a subarray (as view, not copy!)
|
String |
toString() |
void |
unset()
Clear the contents.
|
protected IntegerDBIDVar()
protected IntegerDBIDVar(DBIDRef val)
val - public int internalGetIndex()
DBIDRefinternalGetIndex in interface DBIDRefprotected void internalSetIndex(int i)
i - integer valuepublic void set(DBIDRef ref)
DBIDVarpublic void setFirst(DBIDPair pair)
DBIDVarpublic void setSecond(DBIDPair pair)
DBIDVar@Deprecated public DBID get(int i)
ArrayDBIDsDBIDArrayIter via ArrayDBIDs.iter() instead, or
an DBIDVar via ArrayDBIDs.assignVar(int, de.lmu.ifi.dbs.elki.database.ids.DBIDVar)get in interface ArrayDBIDsi - Indexpublic int size()
ArrayDBIDssize in interface ArrayDBIDssize in interface DBIDspublic boolean isEmpty()
DBIDspublic void unset()
DBIDVarpublic boolean isSet()
DBIDVarpublic 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 boolean contains(DBIDRef o)
DBIDspublic DBIDVar assignVar(int i, DBIDVar var)
ArrayDBIDsindex.assignVar in interface ArrayDBIDsi - Positionvar - Variable to assign the value to.public DBIDVar from(DBIDDataStore store, DBIDRef ref)
DBIDVarpublic ArrayDBIDs slice(int begin, int end)
ArrayDBIDsslice in interface ArrayDBIDsbegin - Begin (inclusive)end - End (exclusive)public IntegerDBIDVar.Itr iter()
ArrayDBIDsiter in interface ArrayDBIDsiter in interface DBIDsiter in interface IntegerDBIDsCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.