Class DoublesSketchIterator
java.lang.Object
org.apache.datasketches.quantiles.DoublesSketchIterator
- All Implemented Interfaces:
QuantilesDoublesSketchIterator,QuantilesSketchIterator
Iterator over DoublesSketch. The order is not defined.
-
Method Summary
Modifier and TypeMethodDescriptiondoubleGets the double quantile at the current index.longGets the natural weight at the current index.booleannext()Advances the index and checks if it is valid.
-
Method Details
-
getQuantile
public double getQuantile()Description copied from interface:QuantilesDoublesSketchIteratorGets the double quantile at the current index.Don't call this before calling next() for the first time or after getting false from next().
- Specified by:
getQuantilein interfaceQuantilesDoublesSketchIterator- Returns:
- the double quantile at the current index.
-
getWeight
public long getWeight()Description copied from interface:QuantilesSketchIteratorGets 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:
getWeightin interfaceQuantilesSketchIterator- Returns:
- the natural weight at the current index.
-
next
public boolean next()Description copied from interface:QuantilesSketchIteratorAdvances the index and checks if it is valid. The state of this iterator is undefined before the first call of this method.- Specified by:
nextin interfaceQuantilesSketchIterator- Returns:
- true if the next index is valid.
-