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 |
update(ArrayOfDoublesSketch sketchIn)
Updates the union by adding a set of entries from a given sketch
|
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 seedpublic void update(ArrayOfDoublesSketch sketchIn)
sketchIn
- 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.