Package elki.evaluation.scores.adapter
Class IncreasingVectorIter
- java.lang.Object
-
- elki.evaluation.scores.adapter.AbstractVectorIter
-
- elki.evaluation.scores.adapter.IncreasingVectorIter
-
- All Implemented Interfaces:
ScoreEvaluation.Adapter
,ArrayIter
,Iter
,it.unimi.dsi.fastutil.ints.IntComparator
,java.util.Comparator<java.lang.Integer>
public class IncreasingVectorIter 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 IncreasingVectorIter(NumberVector positive, NumberVector vec)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IncreasingVectorIter
advance(int count)
Moves the iterator forward or backward by the given offset.int
compare(int x, int y)
IncreasingVectorIter
retract()
Moves the iterator backward to the previous entry.IncreasingVectorIter
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
-
IncreasingVectorIter
public IncreasingVectorIter(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 IncreasingVectorIter 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 IncreasingVectorIter 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 IncreasingVectorIter 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
-
-