Class UpdateDoublesSketch
java.lang.Object
org.apache.datasketches.quantiles.DoublesSketch
org.apache.datasketches.quantiles.UpdateDoublesSketch
public abstract class UpdateDoublesSketch extends DoublesSketch
- Author:
- Jon Malkin
-
Method Summary
Modifier and Type Method Description CompactDoublesSketchcompact()CompactDoublesSketchcompact(org.apache.datasketches.memory.WritableMemory dstMem)Returns a compact version of this sketch.static UpdateDoublesSketchheapify(org.apache.datasketches.memory.Memory srcMem)abstract voidreset()Resets this sketch to the empty state, but retains the original value of k.abstract voidupdate(double dataItem)Updates this sketch with the given double data itemstatic UpdateDoublesSketchwrap(org.apache.datasketches.memory.WritableMemory srcMem)Wrap this sketch around the given non-compact Memory image of a DoublesSketch.Methods inherited from class org.apache.datasketches.quantiles.DoublesSketch
builder, downSample, getCDF, getCompactStorageBytes, getCompactStorageBytes, getK, getKFromEpsilon, getMaxValue, getMinValue, getN, getNormalizedRankError, getNormalizedRankError, getPMF, getQuantile, getQuantileLowerBound, getQuantiles, getQuantiles, getQuantileUpperBound, getRank, getRetainedItems, getStorageBytes, getUpdatableStorageBytes, getUpdatableStorageBytes, isDirect, isEmpty, isEstimationMode, isSameResource, iterator, putMemory, putMemory, toByteArray, toByteArray, toString, toString, toString, toString, wrap
-
Method Details
-
wrap
Wrap this sketch around the given non-compact Memory image of a DoublesSketch.- Parameters:
srcMem- the given Memory image of a DoublesSketch that may have data,- Returns:
- a sketch that wraps the given srcMem
-
update
public abstract void update(double dataItem)Updates this sketch with the given double data item- Parameters:
dataItem- an item from a stream of items. NaNs are ignored.
-
reset
public abstract void reset()Resets this sketch to the empty state, but retains the original value of k. -
heapify
-
compact
- Returns:
- a CompactDoublesSketch of this class
-
compact
Returns a compact version of this sketch. If passing in a Memory object, the compact sketch will use that direct memory; otherwise, an on-heap sketch will be returned.- Parameters:
dstMem- An optional target memory to hold the sketch.- Returns:
- A compact version of this sketch
-