Class CompactDoublesSketch

java.lang.Object
org.apache.datasketches.quantiles.DoublesSketch
org.apache.datasketches.quantiles.CompactDoublesSketch
All Implemented Interfaces:
QuantilesAPI, QuantilesDoublesAPI

public abstract class CompactDoublesSketch extends DoublesSketch
Compact sketches are inherently read only.
Author:
Jon Malkin
  • Method Details

    • isReadOnly

      public boolean isReadOnly()
      Description copied from interface: QuantilesAPI
      Returns true if this sketch is read only.
      Specified by:
      isReadOnly in interface QuantilesAPI
      Specified by:
      isReadOnly in class DoublesSketch
      Returns:
      true if this sketch is read only.
    • reset

      public void reset()
      Description copied from class: DoublesSketch
      Resets this sketch to the empty state. If the sketch is read only this does nothing.

      The parameter k will not change.

      The parameter k will not change.

      Specified by:
      reset in interface QuantilesAPI
      Specified by:
      reset in class DoublesSketch
    • update

      public void update(double quantile)
      Description copied from interface: QuantilesDoublesAPI
      Updates this sketch with the given item.
      Parameters:
      quantile - from a stream of items. NaNs are ignored.