Interface TDigestToExponentialHistogramConverter.CentroidIterator
- All Known Implementing Classes:
TDigestToExponentialHistogramConverter.ArrayBasedCentroidIterator
- Enclosing class:
TDigestToExponentialHistogramConverter
public static interface TDigestToExponentialHistogramConverter.CentroidIterator
An iterator iterating over T-Digest centroids.
The centroids are not required to be unique, but must be sorted in ascending order by the
value().-
Method Summary
Modifier and TypeMethodDescriptionvoidadvance()Advance to the next centroid.longcount()Must only be called ifhasNext()returned true.booleanhasNext()Creates a copy of this iterator that iterates over the centroids this iterator already skipped viaadvance(), but in reverse order.doublevalue()Must only be called ifhasNext()returned true.
-
Method Details
-
hasNext
boolean hasNext()- Returns:
- true if there is another centroid to process
-
value
double value()Must only be called ifhasNext()returned true.- Returns:
- the current centroid's value
-
count
long count()Must only be called ifhasNext()returned true.- Returns:
- the current centroid's count
-
advance
void advance()Advance to the next centroid. -
reversedCopy
TDigestToExponentialHistogramConverter.CentroidIterator reversedCopy()Creates a copy of this iterator that iterates over the centroids this iterator already skipped viaadvance(), but in reverse order.
-