public class DoublesSketchBuilder extends Object
Constructor and Description |
---|
DoublesSketchBuilder()
Constructor for a new DoublesSketchBuilder.
|
Modifier and Type | Method and Description |
---|---|
UpdateDoublesSketch |
build()
Returns an UpdateDoublesSketch with the current configuration of this Builder.
|
UpdateDoublesSketch |
build(org.apache.datasketches.memory.WritableMemory dstMem)
Returns a quantiles UpdateDoublesSketch with the current configuration of this builder
and the specified backing destination Memory store.
|
int |
getK()
Gets the current configured value of k
|
DoublesSketchBuilder |
setK(int k)
Sets the parameter k that determines the accuracy and size of the sketch.
|
String |
toString()
Creates a human readable string that describes the current configuration of this builder.
|
public DoublesSketchBuilder()
public DoublesSketchBuilder setK(int k)
k
- determines the accuracy and size of the sketch.
It is recommended that k be a power of 2 to enable unioning of sketches with
different values of k. It is only possible to union from
larger values of k to smaller values.public int getK()
public UpdateDoublesSketch build()
public UpdateDoublesSketch build(org.apache.datasketches.memory.WritableMemory dstMem)
dstMem
- destination memory for use by the sketchCopyright © 2015–2021 The Apache Software Foundation. All rights reserved.