Package elki.database.ids.integer
Class IntegerDBIDKNNSubList.Itr
- java.lang.Object
-
- elki.database.ids.integer.IntegerDBIDKNNSubList.Itr
-
- All Implemented Interfaces:
DBIDArrayIter
,DBIDIter
,DBIDRef
,DoubleDBIDIter
,DoubleDBIDListIter
,DoubleIntegerDBIDListIter
,IntegerDBIDIter
,IntegerDBIDRef
,ArrayIter
,Iter
- Enclosing class:
- IntegerDBIDKNNSubList
private class IntegerDBIDKNNSubList.Itr extends java.lang.Object implements DoubleIntegerDBIDListIter
Iterator for the sublist.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private DoubleIntegerDBIDListIter
inneriter
Inner iterator.-
Fields inherited from interface elki.database.ids.DoubleDBIDListIter
EMPTY
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Itr()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegerDBIDKNNSubList.Itr
advance()
Moves the iterator forward to the next entry.IntegerDBIDKNNSubList.Itr
advance(int count)
Moves the iterator forward or backward by the given offset.double
doubleValue()
Get the double valueint
getOffset()
Get current iterator offset.int
internalGetIndex()
Internal only: Get the internal index.IntegerDBIDKNNSubList.Itr
retract()
Moves the iterator backward to the previous entry.IntegerDBIDKNNSubList.Itr
seek(int off)
Moves the iterator to the given positionboolean
valid()
Returns true if the iterator currently points to a valid object.
-
-
-
Field Detail
-
inneriter
private DoubleIntegerDBIDListIter inneriter
Inner iterator.
-
-
Method Detail
-
valid
public boolean valid()
Description copied from interface:Iter
Returns true if the iterator currently points to a valid object.
-
advance
public IntegerDBIDKNNSubList.Itr advance()
Description copied from interface:Iter
Moves the iterator forward to the next entry.- Specified by:
advance
in interfaceArrayIter
- Specified by:
advance
in interfaceDBIDArrayIter
- Specified by:
advance
in interfaceDBIDIter
- Specified by:
advance
in interfaceDoubleDBIDIter
- Specified by:
advance
in interfaceDoubleDBIDListIter
- Specified by:
advance
in interfaceDoubleIntegerDBIDListIter
- Specified by:
advance
in interfaceIter
- Returns:
- The iterator itself.
-
doubleValue
public double doubleValue()
Description copied from interface:DoubleDBIDIter
Get the double value- Specified by:
doubleValue
in interfaceDoubleDBIDIter
- Returns:
- double value
-
internalGetIndex
public int internalGetIndex()
Description copied from interface:DBIDRef
Internal only: Get the internal index.NOT FOR PUBLIC USE - ELKI Optimization engine only.
- Specified by:
internalGetIndex
in interfaceDBIDRef
- Specified by:
internalGetIndex
in interfaceIntegerDBIDRef
- Returns:
- Internal index
-
getOffset
public int getOffset()
Description copied from interface:ArrayIter
Get current iterator offset.
-
advance
public IntegerDBIDKNNSubList.Itr advance(int count)
Description copied from interface:ArrayIter
Moves the iterator forward or backward by the given offset.- Specified by:
advance
in interfaceArrayIter
- Specified by:
advance
in interfaceDBIDArrayIter
- Specified by:
advance
in interfaceDoubleDBIDListIter
- Specified by:
advance
in interfaceDoubleIntegerDBIDListIter
- Parameters:
count
- offset to move forward or backwards- Returns:
- Iterator
-
retract
public IntegerDBIDKNNSubList.Itr retract()
Description copied from interface:ArrayIter
Moves the iterator backward to the previous entry.- Specified by:
retract
in interfaceArrayIter
- Specified by:
retract
in interfaceDBIDArrayIter
- Specified by:
retract
in interfaceDoubleDBIDListIter
- Specified by:
retract
in interfaceDoubleIntegerDBIDListIter
- Returns:
- Iterator
-
seek
public IntegerDBIDKNNSubList.Itr seek(int off)
Description copied from interface:ArrayIter
Moves the iterator to the given position- Specified by:
seek
in interfaceArrayIter
- Specified by:
seek
in interfaceDBIDArrayIter
- Specified by:
seek
in interfaceDoubleDBIDListIter
- Specified by:
seek
in interfaceDoubleIntegerDBIDListIter
- Parameters:
off
- Seek offset- Returns:
- Iterator
-
-