Class ArrayOfDoublesUpdatableSketchBuilder
java.lang.Object
org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder
public class ArrayOfDoublesUpdatableSketchBuilder extends Object
For building a new ArrayOfDoublesUpdatableSketch
-
Constructor Summary
Constructors Constructor Description ArrayOfDoublesUpdatableSketchBuilder()Creates an instance of builder with default parameters -
Method Summary
Modifier and Type Method Description ArrayOfDoublesUpdatableSketchbuild()Returns an ArrayOfDoublesUpdatableSketch with the current configuration of this Builder.ArrayOfDoublesUpdatableSketchbuild(org.apache.datasketches.memory.WritableMemory dstMem)Returns an ArrayOfDoublesUpdatableSketch with the current configuration of this Builder.ArrayOfDoublesUpdatableSketchBuildersetNominalEntries(int nomEntries)This is to set the nominal number of entries.ArrayOfDoublesUpdatableSketchBuildersetNumberOfValues(int numValues)This is to set the number of double values associated with each keyArrayOfDoublesUpdatableSketchBuildersetResizeFactor(ResizeFactor resizeFactor)This is to set the resize factor.ArrayOfDoublesUpdatableSketchBuildersetSamplingProbability(float samplingProbability)This is to set sampling probability.ArrayOfDoublesUpdatableSketchBuildersetSeed(long seed)Sets the long seed value that is required by the hashing function.
-
Constructor Details
-
ArrayOfDoublesUpdatableSketchBuilder
public ArrayOfDoublesUpdatableSketchBuilder()Creates an instance of builder with default parameters
-
-
Method Details
-
setNominalEntries
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
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
This is to set sampling probability. Default probability is 1.- Parameters:
samplingProbability- sampling probability from 0 to 1- Returns:
- this builder
-
setNumberOfValues
This is to set the number of double values associated with each key- Parameters:
numValues- number of double values- Returns:
- this builder
-
setSeed
Sets the long seed value that is required by the hashing function.- Parameters:
seed- See seed- Returns:
- this builder
-
build
Returns an ArrayOfDoublesUpdatableSketch with the current configuration of this Builder.- Returns:
- an ArrayOfDoublesUpdatableSketch
-
build
Returns an ArrayOfDoublesUpdatableSketch with the current configuration of this Builder.- Parameters:
dstMem- instance of Memory to be used by the sketch- Returns:
- an ArrayOfDoublesUpdatableSketch
-