Package org.apache.datasketches.tuple.arrayofdoubles

# 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
`ArrayOfDoublesUpdatableSketch`
`build()`
Returns an ArrayOfDoublesUpdatableSketch with the current configuration of this Builder.
`ArrayOfDoublesUpdatableSketch`
`build(org.apache.datasketches.memory.WritableMemory dstMem)`
Returns an ArrayOfDoublesUpdatableSketch with the current configuration of this Builder.
`ArrayOfDoublesUpdatableSketchBuilder`
`setNominalEntries(int nomEntries)`
This is to set the nominal number of entries.
`ArrayOfDoublesUpdatableSketchBuilder`
`setNumberOfValues(int numValues)`
This is to set the number of double values associated with each key
`ArrayOfDoublesUpdatableSketchBuilder`
`setResizeFactor(ResizeFactor resizeFactor)`
This is to set the resize factor.
`ArrayOfDoublesUpdatableSketchBuilder`
`setSamplingProbability(float samplingProbability)`
This is to set sampling probability.
`ArrayOfDoublesUpdatableSketchBuilder`
`setSeed(long seed)`
Sets the long seed value that is required by the hashing function.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ArrayOfDoublesUpdatableSketchBuilder

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

## Method Details

### 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

### setSeed

public ArrayOfDoublesUpdatableSketchBuilder setSeed(long seed)
Sets the long seed value that is required by the hashing function.

Parameters:
  `seed` - See seed
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