Package org.apache.datasketches.kll
Class KllFloatsSketchIterator
- java.lang.Object
-
- org.apache.datasketches.kll.KllFloatsSketchIterator
-
- All Implemented Interfaces:
QuantilesFloatsSketchIterator
,QuantilesSketchIterator
public final class KllFloatsSketchIterator extends Object implements QuantilesFloatsSketchIterator
Iterator over KllFloatsSketch. The order is not defined.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getQuantile()
Gets the float quantile at the current index.long
getWeight()
Gets the natural weight at the current index.boolean
next()
Advances the index and checks if it is valid.
-
-
-
Method Detail
-
getQuantile
public float getQuantile()
Description copied from interface:QuantilesFloatsSketchIterator
Gets the float quantile at the current index.Don't call this before calling next() for the first time or after getting false from next().
- Specified by:
getQuantile
in interfaceQuantilesFloatsSketchIterator
- Returns:
- the float quantile at the current index.
-
getWeight
public long getWeight()
Description copied from interface:QuantilesSketchIterator
Gets the natural weight at the current index.Don't call this before calling next() for the first time or after getting false from next().
- Specified by:
getWeight
in interfaceQuantilesSketchIterator
- Returns:
- the natural weight at the current index.
-
next
public boolean next()
Description copied from interface:QuantilesSketchIterator
Advances the index and checks if it is valid. The state of this iterator is undefined before the first call of this method.- Specified by:
next
in interfaceQuantilesSketchIterator
- Returns:
- true if the next index is valid.
-
-