U - Type of the value, which is passed to update method of a SummaryS - Type of the UpdatableSummary<U>public class UpdatableSketch<U,S extends UpdatableSummary<U>> extends Sketch<S>
PREAMBLE_LONGS| Modifier and Type | Method and Description |
|---|---|
CompactSketch<S> |
compact()
Converts the current state of the sketch into a compact sketch
|
int |
getRetainedEntries() |
S[] |
getSummaries() |
byte[] |
toByteArray()
This is to serialize an instance to a byte array.
|
void |
trim()
Rebuilds reducing the actual number of entries to the nominal number of entries if needed
|
void |
update(byte[] key,
U value)
Updates this sketch with a byte[] key and U value.
|
void |
update(double key,
U value)
Updates this sketch with a double key and U value.
|
void |
update(int[] key,
U value)
Updates this sketch with a int[] key and U value.
|
void |
update(long[] key,
U value)
Updates this sketch with a long[] key and U value.
|
void |
update(long key,
U value)
Updates this sketch with a long key and U value.
|
void |
update(String key,
U value)
Updates this sketch with a String key and U value.
|
getEstimate, getLowerBound, getTheta, getUpperBound, isEmpty, isEstimationMode, iteratorpublic void update(long key,
U value)
key - The given long keyvalue - The given U valuepublic void update(double key,
U value)
key - The given double keyvalue - The given U valuepublic void update(String key, U value)
key - The given String keyvalue - The given U valuepublic void update(byte[] key,
U value)
key - The given byte[] keyvalue - The given U valuepublic void update(int[] key,
U value)
key - The given int[] keyvalue - The given U valuepublic void update(long[] key,
U value)
key - The given long[] keyvalue - The given U valuepublic S[] getSummaries()
getSummaries in class Sketch<S extends Summary>public int getRetainedEntries()
getRetainedEntries in class Sketch<S extends Summary>public void trim()
public CompactSketch<S> compact()
public byte[] toByteArray()
SketchtoByteArray in class Sketch<S extends Summary>Copyright © 2015–2017 Yahoo! Inc.. All rights reserved.