public class ReqSketchSortedView extends Object implements FloatsSortedView
Constructor and Description |
---|
ReqSketchSortedView(ReqSketch sk)
Constructs this Sorted View given the sketch
|
Modifier and Type | Method and Description |
---|---|
long[] |
getCumulativeWeights()
Returns the array of cumulative weights
|
float |
getQuantile(double rank,
QuantileSearchCriteria searchCrit)
Gets the approximate quantile of the given normalized rank and the given search criterion.
|
float[] |
getQuantiles()
Returns the array of quantiles
|
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.
|
ReqSketchSortedViewIterator |
iterator()
Returns an iterator for this Sorted View.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCDF, getPMF
public ReqSketchSortedView(ReqSketch sk)
sk
- the given ReqSketchpublic float getQuantile(double rank, QuantileSearchCriteria searchCrit)
FloatsSortedView
getQuantile
in interface FloatsSortedView
rank
- 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.QuantileSearchCriteria
public double getRank(float quantile, QuantileSearchCriteria searchCrit)
FloatsSortedView
getRank
in interface FloatsSortedView
quantile
- the given quantilesearchCrit
- if INCLUSIVE the given quantile is included into the rank.QuantileSearchCriteria
public long[] getCumulativeWeights()
SortedView
getCumulativeWeights
in interface SortedView
public float[] getQuantiles()
FloatsSortedView
getQuantiles
in interface FloatsSortedView
public boolean isEmpty()
SortedView
isEmpty
in interface SortedView
public ReqSketchSortedViewIterator iterator()
SortedView
iterator
in interface FloatsSortedView
iterator
in interface SortedView
Copyright © 2015–2022 The Apache Software Foundation. All rights reserved.