Class AbstractStaticHistogram.Iter
- java.lang.Object
-
- elki.utilities.datastructures.histogram.AbstractStaticHistogram.Iter
-
- All Implemented Interfaces:
Histogram.Iter
,ArrayIter
,Iter
- Direct Known Subclasses:
DoubleHistogram.Iter
,ObjHistogram.Iter
- Enclosing class:
- AbstractStaticHistogram
public abstract class AbstractStaticHistogram.Iter extends java.lang.Object implements Histogram.Iter
Iterator class to iterate over all bins.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
bin
Current bin number
-
Constructor Summary
Constructors Constructor Description Iter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractStaticHistogram.Iter
advance()
Moves the iterator forward to the next entry.AbstractStaticHistogram.Iter
advance(int count)
Moves the iterator forward or backward by the given offset.double
getCenter()
Get the bin center.double
getLeft()
Get the bin minimum.int
getOffset()
Get current iterator offset.double
getRight()
Get the bin maximum.AbstractStaticHistogram.Iter
retract()
Moves the iterator backward to the previous entry.AbstractStaticHistogram.Iter
seek(int off)
Moves the iterator to the given positionboolean
valid()
Returns true if the iterator currently points to a valid object.
-
-
-
Method Detail
-
getCenter
public double getCenter()
Description copied from interface:Histogram.Iter
Get the bin center.- Specified by:
getCenter
in interfaceHistogram.Iter
- Returns:
- bin center value
-
getLeft
public double getLeft()
Description copied from interface:Histogram.Iter
Get the bin minimum.- Specified by:
getLeft
in interfaceHistogram.Iter
- Returns:
- bin left value
-
getRight
public double getRight()
Description copied from interface:Histogram.Iter
Get the bin maximum.- Specified by:
getRight
in interfaceHistogram.Iter
- Returns:
- bin right value
-
valid
public boolean valid()
Description copied from interface:Iter
Returns true if the iterator currently points to a valid object.
-
advance
public AbstractStaticHistogram.Iter advance()
Description copied from interface:Iter
Moves the iterator forward to the next entry.
-
getOffset
public int getOffset()
Description copied from interface:ArrayIter
Get current iterator offset.
-
advance
public AbstractStaticHistogram.Iter advance(int count)
Description copied from interface:ArrayIter
Moves the iterator forward or backward by the given offset.
-
retract
public AbstractStaticHistogram.Iter retract()
Description copied from interface:ArrayIter
Moves the iterator backward to the previous entry.
-
seek
public AbstractStaticHistogram.Iter seek(int off)
Description copied from interface:ArrayIter
Moves the iterator to the given position
-
-