Modifier and Type | Field and Description |
---|---|
(package private) DistanceResultPair<?> |
cur
Current result
|
(package private) Iterator<? extends DistanceResultPair<?>> |
itr
The real iterator.
|
Modifier | Constructor and Description |
---|---|
protected |
KNNUtil.DBIDItr(Iterator<? extends DistanceResultPair<?>> itr)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
advance()
Moves the iterator forward to the next entry.
|
int |
compareDBID(DBIDRef o)
Compare two objects by the value of the referenced DBID.
|
DBID |
getDBID()
Get the referenced
DBID . |
int |
getIntegerID()
Return the integer value of the object ID, if possible.
|
boolean |
sameDBID(DBIDRef other)
Compare the current value of two referenced DBIDs.
|
boolean |
valid()
Returns true if the iterator currently points to a valid object.
|
DistanceResultPair<?> cur
Iterator<? extends DistanceResultPair<?>> itr
protected KNNUtil.DBIDItr(Iterator<? extends DistanceResultPair<?>> itr)
public boolean valid()
Iter
public void advance()
Iter
public int getIntegerID()
DBIDRef
getIntegerID
in interface DBIDRef
public DBID getDBID()
DBIDIter
DBID
.
Efficiency note: this may require materialization of a DBID object - if
possible, use DBIDRef based APIs instead.public boolean sameDBID(DBIDRef other)
DBIDRef
public int compareDBID(DBIDRef o)
DBIDRef
compareDBID
in interface DBIDRef
o
- Other DBID or object