Class DoublesSortedViewIterator

java.lang.Object
org.apache.datasketches.quantilescommon.SortedViewIterator
org.apache.datasketches.quantilescommon.DoublesSortedViewIterator

public final class DoublesSortedViewIterator extends SortedViewIterator
Iterator over quantile sketches of primitive type double.
  • Constructor Details

    • DoublesSortedViewIterator

      public DoublesSortedViewIterator(double[] quantiles, long[] cumWeights)
      Constructor.
      Parameters:
      quantiles - the given array of quantiles, which must be ordered.
      cumWeights - the given array of cumulative weights, which must be ordered, start with the value one, and the last value must be equal to N, the total number of items updated to the sketch.
  • Method Details

    • getQuantile

      public double getQuantile()
      Gets the quantile at the current index.

      Don't call this before calling next() for the first time or after getting false from next().

      Returns:
      the quantile at the current index.