S
- Type of Summarypublic abstract class Sketch<S extends Summary> extends Object
Modifier and Type | Field and Description |
---|---|
protected static byte |
PREAMBLE_LONGS |
protected SummaryFactory<S> |
summaryFactory_ |
Modifier and Type | Method and Description |
---|---|
abstract CompactSketch<S> |
compact()
Converts this sketch to a CompactSketch on the Java heap.
|
abstract int |
getCountLessThanThetaLong(long thetaLong)
Gets the number of hash values less than the given theta expressed as a long.
|
double |
getEstimate()
Estimates the cardinality of the set (number of unique values presented to the sketch)
|
double |
getEstimate(int numSubsetEntries)
Gets the estimate of the true distinct population of subset tuples represented by the count
of entries in a subset of the total retained entries of the sketch.
|
double |
getLowerBound(int numStdDev)
Gets the approximate lower error bound given the specified number of Standard Deviations.
|
double |
getLowerBound(int numStdDev,
int numSubsetEntries)
Gets the estimate of the lower bound of the true distinct population represented by the count
of entries in a subset of the total retained entries of the sketch.
|
abstract int |
getRetainedEntries() |
SummaryFactory<S> |
getSummaryFactory()
Gets the Summary Factory class of type S
|
double |
getTheta()
Gets the value of theta as a double between zero and one
|
long |
getThetaLong()
Returns Theta as a long
|
double |
getUpperBound(int numStdDev)
Gets the approximate upper error bound given the specified number of Standard Deviations.
|
double |
getUpperBound(int numStdDev,
int numSubsetEntries)
Gets the estimate of the upper bound of the true distinct population represented by the count
of entries in a subset of the total retained entries of the sketch.
|
boolean |
isEmpty()
|
boolean |
isEstimationMode()
Returns true if the sketch is Estimation Mode (as opposed to Exact Mode).
|
abstract TupleSketchIterator<S> |
iterator()
Returns a SketchIterator
|
abstract byte[] |
toByteArray()
This is to serialize a sketch instance to a byte array.
|
String |
toString() |
protected static final byte PREAMBLE_LONGS
protected SummaryFactory<S extends Summary> summaryFactory_
public abstract CompactSketch<S> compact()
If this sketch is already in compact form this operation returns this.
public double getEstimate()
public double getUpperBound(int numStdDev)
numStdDev
- See Number of Standard Deviationspublic double getLowerBound(int numStdDev)
numStdDev
- See Number of Standard Deviationspublic double getEstimate(int numSubsetEntries)
numSubsetEntries
- number of entries for a chosen subset of the sketch.public double getLowerBound(int numStdDev, int numSubsetEntries)
numStdDev
- See Number of Standard DeviationsnumSubsetEntries
- number of entries for a chosen subset of the sketch.public double getUpperBound(int numStdDev, int numSubsetEntries)
numStdDev
- See Number of Standard DeviationsnumSubsetEntries
- number of entries for a chosen subset of the sketch.public boolean isEmpty()
public boolean isEstimationMode()
public abstract int getRetainedEntries()
public abstract int getCountLessThanThetaLong(long thetaLong)
thetaLong
- the given theta as a long between zero and Long.MAX_VALUE.public SummaryFactory<S> getSummaryFactory()
public double getTheta()
public abstract byte[] toByteArray()
As of 3.0.0, serializing an UpdatableSketch is deprecated. This capability will be removed in a future release. Serializing a CompactSketch is not deprecated.
public abstract TupleSketchIterator<S> iterator()
public long getThetaLong()
Copyright © 2015–2024 The Apache Software Foundation. All rights reserved.