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.
|
static DoublesUnion |
build(DoublesSketch sketch)
Deprecated.
changed name to
heapify(DoublesSketch) to more accuately reflect
its intent |
static DoublesUnion |
build(Memory srcMem)
Deprecated.
changed name to
heapify(Memory) to more accuately reflect its intent |
static DoublesUnion |
copyBuild(DoublesSketch sketch)
Deprecated.
this is a duplicate of
heapify(DoublesSketch) and no longer needed. |
int |
getMaxK()
Gets the current configured value of maxK
|
Memory |
getMemory()
Gets the configured Memory to be initialized by the union for off-heap use.
|
static DoublesUnion |
heapify(DoublesSketch sketch)
Returns a Heap Union object that has been initialized with the data from the given sketch.
|
static DoublesUnion |
heapify(Memory srcMem)
Returns a Heap Union object that has been initialized with the data from the given memory
image of a sketch.
|
DoublesUnionBuilder |
initMemory(Memory mem)
Specifies the Memory to be initialized for a new off-heap version of the union.
|
DoublesUnionBuilder |
setK(int maxK)
Deprecated.
please use
setMaxK(int), which more accurately describes its function. |
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(Memory mem)
Returns a Union object that wraps off-heap data of the given memory image of
a sketch.
|
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.@Deprecated public DoublesUnionBuilder setK(int maxK)
setMaxK(int), which more accurately describes its function.setMaxK(int).maxK - See setMaxK(int).public DoublesUnionBuilder initMemory(Memory mem)
mem - the given Memory.public int getMaxK()
public Memory getMemory()
public DoublesUnion build()
public static DoublesUnion heapify(DoublesSketch sketch)
sketch - A DoublesSketch to be used as a source of data only and will not be modified.public static DoublesUnion heapify(Memory srcMem)
srcMem - A memory image of a DoublesSketch to be used as a source of data,
but will not be modified.public static DoublesUnion wrap(Memory mem)
mem - A memory region to be used as the data structure for the sketch
and will be modified.@Deprecated public static DoublesUnion build(DoublesSketch sketch)
heapify(DoublesSketch) to more accuately reflect
its intentsketch - A DoublesSketch to be used as a source of data only and will not be modified.@Deprecated public static DoublesUnion build(Memory srcMem)
heapify(Memory) to more accuately reflect its intentsrcMem - a Memory image of a DoublesSketch@Deprecated public static DoublesUnion copyBuild(DoublesSketch sketch)
heapify(DoublesSketch) and no longer needed.sketch - A DoublesSketch to be used as a source of data, but will not be modified.Copyright © 2015–2017 Yahoo! Inc.. All rights reserved.