public class DoublesUnionBuilder extends Object
Constructor and Description |
---|
DoublesUnionBuilder()
Constructor for a new DoublesUnionBuilder.
|
Modifier and Type | Method and Description |
---|---|
DoublesUnion |
build()
Returns a new empty Union object with the current configuration of this Builder.
|
DoublesUnion |
build(org.apache.datasketches.memory.WritableMemory dstMem)
Returns a new empty Union object with the current configuration of this Builder
and the specified backing destination Memory store.
|
int |
getMaxK()
Gets the current configured value of maxK
|
static DoublesUnion |
heapify(DoublesSketch sketch)
Deprecated.
v2.0.0. Moved to DoublesUnion
|
static DoublesUnion |
heapify(org.apache.datasketches.memory.Memory srcMem)
Deprecated.
v2.0.0. Moved to DoublesUnion
|
DoublesUnionBuilder |
setMaxK(int maxK)
Sets the parameter masK that determines the maximum size of the sketch that
results from a union and its accuracy.
|
static DoublesUnion |
wrap(org.apache.datasketches.memory.Memory mem)
Deprecated.
v2.0.0. Moved to DoublesUnion
|
static DoublesUnion |
wrap(org.apache.datasketches.memory.WritableMemory mem)
Deprecated.
v2.0.0. Moved to DoublesUnion
|
public DoublesUnionBuilder()
public DoublesUnionBuilder setMaxK(int maxK)
maxK
- determines the accuracy and size of the union and is a maximum value.
The effective k can be smaller due to unions with smaller k sketches.
It is recommended that maxK be a power of 2 to enable unioning of sketches with
different values of k.public int getMaxK()
public DoublesUnion build()
public DoublesUnion build(org.apache.datasketches.memory.WritableMemory dstMem)
dstMem
- the destination memory@Deprecated public static DoublesUnion heapify(DoublesSketch sketch)
sketch
- A DoublesSketch to be used as a source of data only and will not be modified.@Deprecated public static DoublesUnion heapify(org.apache.datasketches.memory.Memory srcMem)
srcMem
- A memory image of a DoublesSketch to be used as a source of data,
but will not be modified.@Deprecated public static DoublesUnion wrap(org.apache.datasketches.memory.Memory mem)
mem
- A memory region to be used as the data structure for the sketch
and will be modified.@Deprecated public static DoublesUnion wrap(org.apache.datasketches.memory.WritableMemory mem)
mem
- A memory region to be used as the data structure for the sketch
and will be modified.Copyright © 2015–2021 The Apache Software Foundation. All rights reserved.