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(int k)
Returns a quantiles UpdateDoublesSketch with the current configuration of this builder and the
given parameter k.
|
int |
getK()
Gets the current configured value of k
|
Memory |
getMemory()
Gets the configured Memory to be initialized by the sketch for off-heap use.
|
DoublesSketchBuilder |
initMemory(Memory mem)
Specifies the Memory to be initialized for a new off-heap version of the sketch.
|
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 DoublesSketchBuilder initMemory(Memory mem)
mem - the given Memory.public int getK()
public Memory getMemory()
public UpdateDoublesSketch build()
public UpdateDoublesSketch build(int k)
k - determines the accuracy and size of the sketch.
k must be greater than 1 and less than 65536.
It is recommended that k be a power of 2 to enable merging of sketches with
different values of k. However, in this case it is only possible to merge from
larger values of k to smaller values.Copyright © 2015–2017 Yahoo! Inc.. All rights reserved.