Interface SortedView
-
- All Known Subinterfaces:
DoublesSortedView
,FloatsSortedView
,GenericSortedView<T>
- All Known Implementing Classes:
DoublesSketchSortedView
,ItemsSketchSortedView
,KllDoublesSketchSortedView
,KllFloatsSketchSortedView
,KllItemsSketchSortedView
,ReqSketchSortedView
public interface SortedView
This is the base interface for the Sorted View interface hierarchy.The Sorted View provides a view of the data retained by a quantiles-type sketch that would be cumbersome to get any other way. One can iterate over the contents of the sketch using the sketch's iterator, but the result is not sorted.
Once this sorted view has been created, it provides not only a sorted view of the data retained by the sketch but also the basic queries, such as getRank(), getQuantile(), and getCDF() and getPMF(). In addition, the iterator obtained from this sorted view provides useful detailed information about each entry.
The data from a Sorted view is an unbiased sample of the input stream that can be used for other kinds of analysis not directly provided by the sketch. For example, comparing two sketches using the Kolmogorov-Smirnov test.
- Author:
- Alexander Saydakov, Lee Rhodes
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long[]
getCumulativeWeights()
Returns the array of cumulative weightsboolean
isEmpty()
Returns true if this sorted view is empty.SortedViewIterator
iterator()
Returns an iterator for this Sorted View.
-
-
-
Method Detail
-
getCumulativeWeights
long[] getCumulativeWeights()
Returns the array of cumulative weights- Returns:
- the array of cumulative weights
-
isEmpty
boolean isEmpty()
Returns true if this sorted view is empty.- Returns:
- true if this sorted view is empty.
-
iterator
SortedViewIterator iterator()
Returns an iterator for this Sorted View.- Returns:
- an iterator for this Sorted View.
-
-