Class UpdateDoublesSketch

    • Method Detail

      • wrap

        public static UpdateDoublesSketch wrap​(org.apache.datasketches.memory.WritableMemory srcMem)
        Wrap this sketch around the given non-compact Memory image of a DoublesSketch.
        Parameters:
        srcMem - the given Memory image of a DoublesSketch that may have data,
        Returns:
        a sketch that wraps the given srcMem
      • update

        public abstract void update​(double item)
        Updates this sketch with the given double data item
        Parameters:
        item - an item from a stream of items. NaNs are ignored.
      • heapify

        public static UpdateDoublesSketch heapify​(org.apache.datasketches.memory.Memory srcMem)
      • compact

        public CompactDoublesSketch compact​(org.apache.datasketches.memory.WritableMemory dstMem)
        Returns a compact version of this sketch. If passing in a Memory object, the compact sketch will use that direct memory; otherwise, an on-heap sketch will be returned.
        Parameters:
        dstMem - An optional target memory to hold the sketch.
        Returns:
        A compact version of this sketch