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 mem)
Heapify the given Memory as an ArrayOfDoublesUnion
|
static ArrayOfDoublesUnion |
heapify(org.apache.datasketches.memory.Memory mem,
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
|
void |
update(ArrayOfDoublesSketch tupleSketch)
Deprecated.
2.0.0. Please use
union(ArrayOfDoublesSketch) . |
static ArrayOfDoublesUnion |
wrap(org.apache.datasketches.memory.Memory mem)
Wrap the given Memory as an ArrayOfDoublesUnion
|
static ArrayOfDoublesUnion |
wrap(org.apache.datasketches.memory.Memory mem,
long seed)
Wrap the given Memory and seed as an ArrayOfDoublesUnion
|
static ArrayOfDoublesUnion |
wrap(org.apache.datasketches.memory.WritableMemory mem)
Wrap the given WritableMemory as an ArrayOfDoublesUnion
|
static ArrayOfDoublesUnion |
wrap(org.apache.datasketches.memory.WritableMemory mem,
long seed)
Wrap the given WritableMemory and seed as an ArrayOfDoublesUnion
|
public static ArrayOfDoublesUnion heapify(org.apache.datasketches.memory.Memory mem)
mem
- the given Memorypublic static ArrayOfDoublesUnion heapify(org.apache.datasketches.memory.Memory mem, long seed)
mem
- the given Memoryseed
- the given seedpublic static ArrayOfDoublesUnion wrap(org.apache.datasketches.memory.Memory mem)
mem
- the given Memorypublic static ArrayOfDoublesUnion wrap(org.apache.datasketches.memory.Memory mem, long seed)
mem
- the given Memoryseed
- the given seedpublic static ArrayOfDoublesUnion wrap(org.apache.datasketches.memory.WritableMemory mem)
mem
- the given Memorypublic static ArrayOfDoublesUnion wrap(org.apache.datasketches.memory.WritableMemory mem, long seed)
mem
- the given Memoryseed
- the given seed@Deprecated public void update(ArrayOfDoublesSketch tupleSketch)
union(ArrayOfDoublesSketch)
.tupleSketch
- input tuple sketch to add to the internal set.
Nulls and empty sketches are ignored.
public 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
given value.numValues
- Number of double values to keep for each keyCopyright © 2015–2021 The Apache Software Foundation. All rights reserved.