public abstract class CompactSketch extends Sketch
A CompactSketch is the simplist form of a Theta Sketch. It consists of a compact list (i.e., no intervening spaces) of hash values, which may be ordered or not, a value for theta and a seed hash. A CompactSketch is read-only, and the space required when stored is only the space required for the hash values and 8 to 24 bytes of preamble. An empty CompactSketch consumes only 8 bytes.
| Modifier and Type | Method and Description |
|---|---|
Family |
getFamily()
Returns the Family that this sketch belongs to
|
int |
getRetainedEntries(boolean valid)
Returns the number of entries that have been retained by the sketch.
|
boolean |
isCompact()
Returns true if this sketch is in compact form.
|
boolean |
isEmpty()
|
getCountLessThanTheta, getCurrentBytes, getEstimate, getLowerBound, getMaxCompactSketchBytes, getMaxUpdateSketchBytes, getRetainedEntries, getSerializationVersion, getTheta, getUpperBound, heapify, heapify, isDirect, isEstimationMode, isOrdered, toByteArray, toString, toString, wrap, wrappublic int getRetainedEntries(boolean valid)
SketchgetRetainedEntries in class Sketchvalid - if true, returns the number of valid entries, which are less than theta and used
for estimation.
Otherwise, return the number of all entries, valid or not, that are currently in the internal
sketch cache.public boolean isEmpty()
Sketchpublic Family getFamily()
SketchCopyright © 2015–2017 Yahoo! Inc.. All rights reserved.