public final class ReqSketchSortedView extends Object implements FloatsSortedView
| Constructor and Description |
|---|
ReqSketchSortedView(ReqSketch sketch)
Constructs this Sorted View given the sketch
|
| Modifier and Type | Method and Description |
|---|---|
long[] |
getCumulativeWeights()
Returns the array of cumulative weights from the sketch.
|
float |
getMaxItem()
Returns the maximum item of the stream.
|
float |
getMinItem()
Returns the minimum item of the stream.
|
long |
getN()
Returns the total number of items presented to the sourcing sketch.
|
float |
getQuantile(double rank,
QuantileSearchCriteria searchCrit)
Gets the approximate quantile of the given normalized rank and the given search criterion.
|
float[] |
getQuantiles()
Returns an array of all retained quantiles by the sketch.
|
double |
getRank(float quantile,
QuantileSearchCriteria searchCrit)
Gets the normalized rank corresponding to the given a quantile.
|
boolean |
isEmpty()
Returns true if this sorted view is empty.
|
FloatsSortedViewIterator |
iterator()
Returns an iterator for this Sorted View.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCDF, getPMFpublic ReqSketchSortedView(ReqSketch sketch)
sketch - the given ReqSketchpublic long[] getCumulativeWeights()
SortedViewgetCumulativeWeights in interface SortedViewpublic float getMaxItem()
FloatsSortedViewgetMaxItem in interface FloatsSortedViewpublic float getMinItem()
FloatsSortedViewgetMinItem in interface FloatsSortedViewpublic long getN()
SortedViewgetN in interface SortedViewpublic float getQuantile(double rank,
QuantileSearchCriteria searchCrit)
FloatsSortedViewgetQuantile in interface FloatsSortedViewrank - the given normalized rank, a double in the range [0.0, 1.0].searchCrit - If INCLUSIVE, the given rank includes all quantiles ≤
the quantile directly corresponding to the given rank.
If EXCLUSIVE, he given rank includes all quantiles <
the quantile directly corresponding to the given rank.QuantileSearchCriteriapublic float[] getQuantiles()
FloatsSortedViewgetQuantiles in interface FloatsSortedViewpublic double getRank(float quantile,
QuantileSearchCriteria searchCrit)
FloatsSortedViewgetRank in interface FloatsSortedViewquantile - the given quantilesearchCrit - if INCLUSIVE the given quantile is included into the rank.QuantileSearchCriteriapublic boolean isEmpty()
SortedViewisEmpty in interface SortedViewpublic FloatsSortedViewIterator iterator()
SortedViewiterator in interface FloatsSortedViewiterator in interface SortedViewCopyright © 2015–2022 The Apache Software Foundation. All rights reserved.