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 DecreasingVectorIter
advance(int count)
Moves the iterator forward or backward by the given offset.int
compare(int x, int y)
DecreasingVectorIter
retract()
Moves the iterator backward to the previous entry.DecreasingVectorIter
seek(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:
compare
in interfaceit.unimi.dsi.fastutil.ints.IntComparator
-
advance
public DecreasingVectorIter advance(int count)
Description copied from interface:ArrayIter
Moves the iterator forward or backward by the given offset.- Specified by:
advance
in interfaceArrayIter
- Overrides:
advance
in classAbstractVectorIter
- Parameters:
count
- offset to move forward or backwards- Returns:
- Iterator
-
retract
public DecreasingVectorIter retract()
Description copied from interface:ArrayIter
Moves the iterator backward to the previous entry.- Specified by:
retract
in interfaceArrayIter
- Overrides:
retract
in classAbstractVectorIter
- Returns:
- Iterator
-
seek
public DecreasingVectorIter seek(int off)
Description copied from interface:ArrayIter
Moves the iterator to the given position- Specified by:
seek
in interfaceArrayIter
- Overrides:
seek
in classAbstractVectorIter
- Parameters:
off
- Seek offset- Returns:
- Iterator
-
-