public abstract class ArrayOfDoublesUnion extends Object
Modifier and Type | Method and Description |
---|---|
static int |
getMaxBytes(int nomEntries,
int numValues) |
ArrayOfDoublesCompactSketch |
getResult()
Returns the resulting union in the form of a compact sketch
|
ArrayOfDoublesCompactSketch |
getResult(org.apache.datasketches.memory.WritableMemory dstMem)
Returns the resulting union in the form of a compact sketch
|
static ArrayOfDoublesUnion |
heapify(org.apache.datasketches.memory.Memory srcMem)
Heapify the given Memory as an ArrayOfDoublesUnion
|
static ArrayOfDoublesUnion |
heapify(org.apache.datasketches.memory.Memory srcMem,
long seed)
Heapify the given Memory and seed as an ArrayOfDoublesUnion
|
void |
reset()
Resets the union to an empty state
|
byte[] |
toByteArray() |
void |
union(ArrayOfDoublesSketch tupleSketch)
Updates the union by adding a set of entries from a given sketch, which can be on-heap or off-heap.
|
static ArrayOfDoublesUnion |
wrap(org.apache.datasketches.memory.Memory srcMem)
Wrap the given Memory as an ArrayOfDoublesUnion
|
static ArrayOfDoublesUnion |
wrap(org.apache.datasketches.memory.Memory srcMem,
long seed)
Wrap the given Memory and seed as an ArrayOfDoublesUnion
|
static ArrayOfDoublesUnion |
wrap(org.apache.datasketches.memory.WritableMemory srcMem)
Wrap the given WritableMemory as an ArrayOfDoublesUnion
|
static ArrayOfDoublesUnion |
wrap(org.apache.datasketches.memory.WritableMemory srcMem,
long seed)
Wrap the given WritableMemory and seed as an ArrayOfDoublesUnion
|
public static ArrayOfDoublesUnion heapify(org.apache.datasketches.memory.Memory srcMem)
srcMem
- the given source Memorypublic static ArrayOfDoublesUnion heapify(org.apache.datasketches.memory.Memory srcMem, long seed)
srcMem
- the given source Memoryseed
- the given seedpublic static ArrayOfDoublesUnion wrap(org.apache.datasketches.memory.Memory srcMem)
srcMem
- the given source Memorypublic static ArrayOfDoublesUnion wrap(org.apache.datasketches.memory.Memory srcMem, long seed)
srcMem
- the given source Memoryseed
- the given seedpublic static ArrayOfDoublesUnion wrap(org.apache.datasketches.memory.WritableMemory srcMem)
srcMem
- the given source Memorypublic static ArrayOfDoublesUnion wrap(org.apache.datasketches.memory.WritableMemory srcMem, long seed)
srcMem
- the given source Memoryseed
- the given seedpublic void union(ArrayOfDoublesSketch tupleSketch)
Nulls and empty sketches are ignored.
tupleSketch
- sketch to add to the unionpublic ArrayOfDoublesCompactSketch getResult(org.apache.datasketches.memory.WritableMemory dstMem)
dstMem
- memory for the result (can be null)public ArrayOfDoublesCompactSketch getResult()
public void reset()
public byte[] toByteArray()
public static int getMaxBytes(int nomEntries, int numValues)
nomEntries
- Nominal number of entries. Forced to the nearest power of 2 greater than or equal to
given value.numValues
- Number of double values to keep for each keyCopyright © 2015–2022 The Apache Software Foundation. All rights reserved.