public abstract class ArrayOfDoublesUpdatableSketch extends ArrayOfDoublesSketch
Modifier and Type | Method and Description |
---|---|
ArrayOfDoublesCompactSketch |
compact()
Gets an on-heap compact representation of the sketch
|
ArrayOfDoublesCompactSketch |
compact(org.apache.datasketches.memory.WritableMemory dstMem)
Gets an off-heap compact representation of the sketch using the given memory
|
abstract int |
getNominalEntries()
Gets the configured nominal number of entries
|
abstract ResizeFactor |
getResizeFactor()
Gets the configured resize factor
|
abstract float |
getSamplingProbability()
Gets the configured sampling probability
|
static ArrayOfDoublesUpdatableSketch |
heapify(org.apache.datasketches.memory.Memory mem)
Heapify the given Memory as an ArrayOfDoublesUpdatableSketch
|
static ArrayOfDoublesUpdatableSketch |
heapify(org.apache.datasketches.memory.Memory mem,
long seed)
Heapify the given Memory and seed as a ArrayOfDoublesUpdatableSketch
|
abstract void |
reset()
Resets this sketch an empty state.
|
abstract void |
trim()
Rebuilds reducing the actual number of entries to the nominal number of entries if needed
|
void |
update(byte[] key,
double[] values)
Updates this sketch with a byte[] key and double values.
|
void |
update(ByteBuffer key,
double[] values)
Updates this sketch with a ByteBuffer key and double values.
|
void |
update(double key,
double[] values)
Updates this sketch with a double key and double values.
|
void |
update(int[] key,
double[] values)
Updates this sketch with a int[] key and double values.
|
void |
update(long[] key,
double[] values)
Updates this sketch with a long[] key and double values.
|
void |
update(long key,
double[] values)
Updates this sketch with a long key and double values.
|
void |
update(String key,
double[] values)
Updates this sketch with a String key and double values.
|
static ArrayOfDoublesUpdatableSketch |
wrap(org.apache.datasketches.memory.WritableMemory mem)
Wrap the given WritableMemory as an ArrayOfDoublesUpdatableSketch
|
static ArrayOfDoublesUpdatableSketch |
wrap(org.apache.datasketches.memory.WritableMemory mem,
long seed)
Wrap the given WritableMemory and seed as a ArrayOfDoublesUpdatableSketch
|
getCurrentBytes, getEstimate, getLowerBound, getMaxBytes, getNumValues, getRetainedEntries, getTheta, getUpperBound, getValues, hasMemory, isEmpty, isEstimationMode, iterator, toByteArray, toString, wrap, wrap
public static ArrayOfDoublesUpdatableSketch heapify(org.apache.datasketches.memory.Memory mem)
mem
- the given Memorypublic static ArrayOfDoublesUpdatableSketch heapify(org.apache.datasketches.memory.Memory mem, long seed)
mem
- the given Memoryseed
- the given seedpublic static ArrayOfDoublesUpdatableSketch wrap(org.apache.datasketches.memory.WritableMemory mem)
mem
- the given Memorypublic static ArrayOfDoublesUpdatableSketch wrap(org.apache.datasketches.memory.WritableMemory mem, long seed)
mem
- the given Memoryseed
- the given seedpublic void update(long key, double[] values)
key
- The given long keyvalues
- The given valuespublic void update(double key, double[] values)
key
- The given double keyvalues
- The given valuespublic void update(String key, double[] values)
key
- The given String keyvalues
- The given valuespublic void update(byte[] key, double[] values)
key
- The given byte[] keyvalues
- The given valuespublic void update(ByteBuffer key, double[] values)
key
- The given ByteBuffer keyvalues
- The given valuespublic void update(int[] key, double[] values)
key
- The given int[] keyvalues
- The given valuespublic void update(long[] key, double[] values)
key
- The given long[] keyvalues
- The given valuespublic abstract int getNominalEntries()
public abstract ResizeFactor getResizeFactor()
public abstract float getSamplingProbability()
public abstract void trim()
public abstract void reset()
public ArrayOfDoublesCompactSketch compact()
compact
in class ArrayOfDoublesSketch
public ArrayOfDoublesCompactSketch compact(org.apache.datasketches.memory.WritableMemory dstMem)
compact
in class ArrayOfDoublesSketch
dstMem
- memory for the compact sketch (can be null)Copyright © 2015–2024 The Apache Software Foundation. All rights reserved.