public abstract class UpdateDoublesSketch extends DoublesSketch
Modifier and Type | Method and Description |
---|---|
CompactDoublesSketch |
compact() |
CompactDoublesSketch |
compact(org.apache.datasketches.memory.WritableMemory dstMem)
Returns a compact version of this sketch.
|
static UpdateDoublesSketch |
heapify(org.apache.datasketches.memory.Memory srcMem) |
abstract void |
reset()
Resets this sketch to the empty state, but retains the original value of k.
|
abstract void |
update(double dataItem)
Updates this sketch with the given double data item
|
static UpdateDoublesSketch |
wrap(org.apache.datasketches.memory.WritableMemory srcMem)
Wrap this sketch around the given non-compact Memory image of a DoublesSketch.
|
builder, downSample, getCDF, getCompactStorageBytes, getCompactStorageBytes, getK, getKFromEpsilon, getMaxValue, getMinValue, getN, getNormalizedRankError, getNormalizedRankError, 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
public static UpdateDoublesSketch wrap(org.apache.datasketches.memory.WritableMemory srcMem)
srcMem
- the given Memory image of a DoublesSketch that may have data,public abstract void update(double dataItem)
dataItem
- an item from a stream of items. NaNs are ignored.public abstract void reset()
public static UpdateDoublesSketch heapify(org.apache.datasketches.memory.Memory srcMem)
public CompactDoublesSketch compact()
public CompactDoublesSketch compact(org.apache.datasketches.memory.WritableMemory dstMem)
dstMem
- An optional target memory to hold the sketch.Copyright © 2015–2021 The Apache Software Foundation. All rights reserved.