public abstract class ArrayOfDoublesSketch extends Object
Modifier and Type | Method and Description |
---|---|
ArrayOfDoublesCompactSketch |
compact() |
abstract ArrayOfDoublesCompactSketch |
compact(org.apache.datasketches.memory.WritableMemory dstMem) |
abstract int |
getCurrentBytes()
For compact sketches this is the same as getMaxBytes().
|
double |
getEstimate()
Estimates the cardinality of the set (number of unique values presented to the sketch)
|
double |
getLowerBound(int numStdDev)
Gets the approximate lower error bound given the specified number of Standard Deviations.
|
abstract int |
getMaxBytes() |
int |
getNumValues() |
abstract int |
getRetainedEntries() |
double |
getTheta()
Gets the value of theta as a double between zero and one
|
double |
getUpperBound(int numStdDev)
Gets the approximate upper error bound given the specified number of Standard Deviations.
|
abstract double[][] |
getValues() |
abstract boolean |
hasMemory()
Returns true if this sketch's data structure is backed by Memory or WritableMemory.
|
static ArrayOfDoublesSketch |
heapify(org.apache.datasketches.memory.Memory mem)
Heapify the given Memory as an ArrayOfDoublesSketch
|
static ArrayOfDoublesSketch |
heapify(org.apache.datasketches.memory.Memory mem,
long seed)
Heapify the given Memory and seed as a ArrayOfDoublesSketch
|
boolean |
isEmpty()
|
boolean |
isEstimationMode()
Returns true if the sketch is Estimation Mode (as opposed to Exact Mode).
|
abstract ArrayOfDoublesSketchIterator |
iterator() |
abstract byte[] |
toByteArray() |
String |
toString() |
static ArrayOfDoublesSketch |
wrap(org.apache.datasketches.memory.Memory mem)
Wrap the given Memory as an ArrayOfDoublesSketch
|
static ArrayOfDoublesSketch |
wrap(org.apache.datasketches.memory.Memory mem,
long seed)
Wrap the given Memory and seed as a ArrayOfDoublesSketch
|
public static ArrayOfDoublesSketch heapify(org.apache.datasketches.memory.Memory mem)
mem
- the given Memorypublic static ArrayOfDoublesSketch heapify(org.apache.datasketches.memory.Memory mem, long seed)
mem
- the given Memoryseed
- the given seedpublic static ArrayOfDoublesSketch wrap(org.apache.datasketches.memory.Memory mem)
mem
- the given Memorypublic static ArrayOfDoublesSketch wrap(org.apache.datasketches.memory.Memory mem, long seed)
mem
- the given Memoryseed
- the given seedpublic double getEstimate()
public double getUpperBound(int numStdDev)
numStdDev
- See Number of Standard Deviationspublic double getLowerBound(int numStdDev)
numStdDev
- See Number of Standard Deviationspublic abstract boolean hasMemory()
public boolean isEmpty()
public int getNumValues()
public boolean isEstimationMode()
public double getTheta()
public abstract int getRetainedEntries()
public abstract int getMaxBytes()
public abstract int getCurrentBytes()
public abstract byte[] toByteArray()
public abstract double[][] getValues()
public abstract ArrayOfDoublesSketchIterator iterator()
public ArrayOfDoublesCompactSketch compact()
public abstract ArrayOfDoublesCompactSketch compact(org.apache.datasketches.memory.WritableMemory dstMem)
dstMem
- the destination WritableMemoryCopyright © 2015–2024 The Apache Software Foundation. All rights reserved.