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 Details

    • hasNext

      boolean hasNext()
      Returns:
      true if there is another centroid to process
    • value

      double value()
      Must only be called if hasNext() returned true.
      Returns:
      the current centroid's value
    • count

      long count()
      Must only be called if hasNext() returned true.
      Returns:
      the current centroid's count
    • advance

      void advance()
      Advance to the next centroid.
    • reversedCopy

      Creates a copy of this iterator that iterates over the centroids this iterator already skipped via advance(), but in reverse order.