Package elki.evaluation.scores.adapter
Class DecreasingVectorIter
- java.lang.Object
-
- elki.evaluation.scores.adapter.AbstractVectorIter
-
- elki.evaluation.scores.adapter.DecreasingVectorIter
-
- All Implemented Interfaces:
ScoreEvaluation.Adapter,ArrayIter,Iter,it.unimi.dsi.fastutil.ints.IntComparator,java.util.Comparator<java.lang.Integer>
public class DecreasingVectorIter extends AbstractVectorIter implements it.unimi.dsi.fastutil.ints.IntComparator
Class to iterate over a number vector in decreasing order.- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Field Summary
-
Fields inherited from class elki.evaluation.scores.adapter.AbstractVectorIter
numPositive, pos, positive, sort, vec
-
-
Constructor Summary
Constructors Constructor Description DecreasingVectorIter(NumberVector positive, NumberVector vec)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecreasingVectorIteradvance(int count)Moves the iterator forward or backward by the given offset.intcompare(int x, int y)DecreasingVectorIterretract()Moves the iterator backward to the previous entry.DecreasingVectorIterseek(int off)Moves the iterator to the given position-
Methods inherited from class elki.evaluation.scores.adapter.AbstractVectorIter
advance, dim, getOffset, numPositive, numTotal, test, tiedToPrevious, valid
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
DecreasingVectorIter
public DecreasingVectorIter(NumberVector positive, NumberVector vec)
Constructor.- Parameters:
positive- Vector of positive valuesvec- Vector to iterate over.
-
-
Method Detail
-
compare
public int compare(int x, int y)- Specified by:
comparein interfaceit.unimi.dsi.fastutil.ints.IntComparator
-
advance
public DecreasingVectorIter advance(int count)
Description copied from interface:ArrayIterMoves the iterator forward or backward by the given offset.- Specified by:
advancein interfaceArrayIter- Overrides:
advancein classAbstractVectorIter- Parameters:
count- offset to move forward or backwards- Returns:
- Iterator
-
retract
public DecreasingVectorIter retract()
Description copied from interface:ArrayIterMoves the iterator backward to the previous entry.- Specified by:
retractin interfaceArrayIter- Overrides:
retractin classAbstractVectorIter- Returns:
- Iterator
-
seek
public DecreasingVectorIter seek(int off)
Description copied from interface:ArrayIterMoves the iterator to the given position- Specified by:
seekin interfaceArrayIter- Overrides:
seekin classAbstractVectorIter- Parameters:
off- Seek offset- Returns:
- Iterator
-
-