public class DoubleIntegerDBIDSubList extends java.lang.Object implements DoubleIntegerDBIDList
Modifier and Type | Class and Description |
---|---|
private class |
DoubleIntegerDBIDSubList.Itr
Iterator for the sublist.
|
DoubleDBIDList.Consumer
Modifier and Type | Field and Description |
---|---|
private int |
begin
Start offset.
|
private int |
end
End offset.
|
private DoubleIntegerDBIDList |
inner
Wrapped inner result.
|
Constructor and Description |
---|
DoubleIntegerDBIDSubList(DoubleIntegerDBIDList inner,
int begin,
int end)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DBIDVar |
assignVar(int index,
DBIDVar var)
Assign a DBID variable the value of position
index . |
boolean |
contains(DBIDRef o)
Test whether an ID is contained.
|
double |
doubleValue(int index)
Get the double value at a given index (to access the DBID, either use
DoubleDBIDList.iter() or DoubleDBIDList.assignVar(int, de.lmu.ifi.dbs.elki.database.ids.DBIDVar) . |
boolean |
isEmpty()
Test for an empty DBID collection.
|
DoubleIntegerDBIDSubList.Itr |
iter()
Get a DBID iterator (a more efficient API).
|
int |
size()
Retrieve the collection / data size.
|
DoubleIntegerDBIDList |
slice(int begin,
int end)
Get a subset list.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachDouble
private final int begin
private final int end
private final DoubleIntegerDBIDList inner
public DoubleIntegerDBIDSubList(DoubleIntegerDBIDList inner, int begin, int end)
inner
- Inner instancebegin
- Begin offsetend
- End offsetpublic DBIDVar assignVar(int index, DBIDVar var)
DoubleDBIDList
index
.assignVar
in interface DoubleDBIDList
index
- Positionvar
- Variable to assign the value to.public double doubleValue(int index)
DoubleDBIDList
DoubleDBIDList.iter()
or DoubleDBIDList.assignVar(int, de.lmu.ifi.dbs.elki.database.ids.DBIDVar)
.doubleValue
in interface DoubleDBIDList
index
- Indexpublic DoubleIntegerDBIDSubList.Itr iter()
DBIDs
Example:
for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
DBID id = iter.getDBID();
}
iter
in interface DBIDs
iter
in interface DoubleDBIDList
iter
in interface DoubleIntegerDBIDList
iter
in interface IntegerDBIDs
public boolean contains(DBIDRef o)
DBIDs
public boolean isEmpty()
DBIDs
public int size()
DBIDs
size
in interface DBIDs
size
in interface DoubleDBIDList
public DoubleIntegerDBIDList slice(int begin, int end)
DoubleDBIDList
slice
in interface DoubleDBIDList
slice
in interface DoubleIntegerDBIDList
begin
- Beginend
- EndCopyright © 2019 ELKI Development Team. License information.