Package org.apache.datasketches.kll
Class KllDoublesSketchIterator
- java.lang.Object
-
- org.apache.datasketches.kll.KllDoublesSketchIterator
-
public class KllDoublesSketchIterator extends Object
Iterator over KllDoublesSketch. The order is not defined.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetValue()Gets a value from the current entry in the sketch.longgetWeight()Gets a weight for the value from the current entry in the sketch.booleannext()Advancing the iterator and checking existence of the next entry is combined here for efficiency.
-
-
-
Method Detail
-
getValue
public double getValue()
Gets a value from the current entry in the sketch. Don't call this before calling next() for the first time or after getting false from next().- Returns:
- value from the current entry
-
getWeight
public long getWeight()
Gets a weight for the value from the current entry in the sketch. Don't call this before calling next() for the first time or after getting false from next().- Returns:
- weight for the value from the current entry
-
next
public boolean next()
Advancing the iterator and checking existence of the next entry is combined here for efficiency. This results in an undefined state of the iterator before the first call of this method.- Returns:
- true if the next element exists
-
-