public class KllSketchIterator extends Object implements QuantilesSketchIterator
Prototype example of the recommended iteration loop:
SketchIterator itr = sketch.iterator();
while (itr.next()) {
...get*();
}
Modifier and Type | Field and Description |
---|---|
protected int |
index |
protected boolean |
isInitialized_ |
protected int |
level |
protected int[] |
levelsArr |
protected int |
numLevels |
protected long |
weight |
Modifier and Type | Method and Description |
---|---|
long |
getWeight()
Gets the natural weight at the current index.
|
boolean |
next()
Advances the index and checks if it is valid.
|
protected final int[] levelsArr
protected final int numLevels
protected int level
protected int index
protected long weight
protected boolean isInitialized_
public long getWeight()
QuantilesSketchIterator
Don't call this before calling next() for the first time or after getting false from next().
getWeight
in interface QuantilesSketchIterator
public boolean next()
QuantilesSketchIterator
next
in interface QuantilesSketchIterator
Copyright © 2015–2024 The Apache Software Foundation. All rights reserved.