public class ReqSketchSortedViewIterator extends Object implements FloatsSortedViewIterator
| Modifier and Type | Method and Description |
|---|---|
long |
getCumulativeWeight(QuantileSearchCriteria searchCrit)
Gets the cumulative weight at the current index (or previous index) based on the chosen search criterion.
|
long |
getN()
Gets the total count of all items presented to the sketch.
|
double |
getNormalizedRank(QuantileSearchCriteria searchCrit)
Gets the normalized rank at the current index (or previous index)
based on the chosen search criterion.
|
float |
getQuantile()
Gets the 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.
|
public long getCumulativeWeight(QuantileSearchCriteria searchCrit)
SortedViewIteratorDon't call this before calling next() for the first time or after getting false from next().
getCumulativeWeight in interface SortedViewIteratorsearchCrit - if INCLUSIVE, includes the weight at the current index in the cumulative sum.
Otherwise, it will return the cumulative weight of the previous index.public long getN()
SortedViewIteratorgetN in interface SortedViewIteratorpublic double getNormalizedRank(QuantileSearchCriteria searchCrit)
SortedViewIteratorDon't call this before calling next() for the first time or after getting false from next().
getNormalizedRank in interface SortedViewIteratorsearchCrit - if INCLUSIVE, includes the normalized rank at the current index.
Otherwise, returns the normalized rank of the previous index.public float getQuantile()
FloatsSortedViewIteratorDon't call this before calling next() for the first time or after getting false from next().
getQuantile in interface FloatsSortedViewIteratorpublic long getWeight()
SortedViewIteratorDon't call this before calling next() for the first time or after getting false from next().
getWeight in interface SortedViewIteratorpublic boolean next()
SortedViewIteratornext in interface SortedViewIteratorCopyright © 2015–2022 The Apache Software Foundation. All rights reserved.