public abstract class ArrayOfDoublesSketch extends Object
Modifier and Type | Method and Description |
---|---|
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.
|
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() |
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 boolean isEmpty()
public int getNumValues()
public boolean isEstimationMode()
public double getTheta()
public abstract int getRetainedEntries()
public abstract byte[] toByteArray()
public abstract double[][] getValues()
public abstract ArrayOfDoublesSketchIterator iterator()
Copyright © 2015–2021 The Apache Software Foundation. All rights reserved.