Class ArrayOfDoublesUpdatableSketchBuilder


  • public class ArrayOfDoublesUpdatableSketchBuilder
    extends Object
    For building a new ArrayOfDoublesUpdatableSketch
    • Constructor Detail

      • ArrayOfDoublesUpdatableSketchBuilder

        public ArrayOfDoublesUpdatableSketchBuilder()
        Creates an instance of builder with default parameters
    • Method Detail

      • setNominalEntries

        public ArrayOfDoublesUpdatableSketchBuilder setNominalEntries​(int nomEntries)
        This is to set the nominal number of entries.
        Parameters:
        nomEntries - Nominal number of entries. Forced to the nearest power of 2 greater than or equal to given value.
        Returns:
        this builder
      • setResizeFactor

        public ArrayOfDoublesUpdatableSketchBuilder setResizeFactor​(ResizeFactor resizeFactor)
        This is to set the resize factor. Value of X1 means that the maximum capacity is allocated from the start. Default resize factor is X8.
        Parameters:
        resizeFactor - value of X1, X2, X4 or X8
        Returns:
        this UpdatableSketchBuilder
      • setSamplingProbability

        public ArrayOfDoublesUpdatableSketchBuilder setSamplingProbability​(float samplingProbability)
        This is to set sampling probability. Default probability is 1.
        Parameters:
        samplingProbability - sampling probability from 0 to 1
        Returns:
        this builder
      • setNumberOfValues

        public ArrayOfDoublesUpdatableSketchBuilder setNumberOfValues​(int numValues)
        This is to set the number of double values associated with each key
        Parameters:
        numValues - number of double values
        Returns:
        this builder
      • build

        public ArrayOfDoublesUpdatableSketch build()
        Returns an ArrayOfDoublesUpdatableSketch with the current configuration of this Builder.
        Returns:
        an ArrayOfDoublesUpdatableSketch
      • build

        public ArrayOfDoublesUpdatableSketch build​(org.apache.datasketches.memory.WritableMemory dstMem)
        Returns an ArrayOfDoublesUpdatableSketch with the current configuration of this Builder.
        Parameters:
        dstMem - instance of Memory to be used by the sketch
        Returns:
        an ArrayOfDoublesUpdatableSketch