Class CompactDoublesSketch
- java.lang.Object
-
- org.apache.datasketches.quantiles.DoublesSketch
-
- org.apache.datasketches.quantiles.CompactDoublesSketch
-
- All Implemented Interfaces:
QuantilesAPI,QuantilesDoublesAPI
public abstract class CompactDoublesSketch extends DoublesSketch
Compact sketches are inherently read only.- Author:
- Jon Malkin
-
-
Field Summary
-
Fields inherited from interface org.apache.datasketches.quantilescommon.QuantilesAPI
EMPTY_MSG, MEM_REQ_SVR_NULL_MSG, NOT_SINGLE_ITEM_MSG, SELF_MERGE_MSG, TGT_IS_READ_ONLY_MSG, UNSUPPORTED_MSG
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CompactDoublesSketchheapify(org.apache.datasketches.memory.Memory srcMem)booleanisReadOnly()Returns true if this sketch is read only.voidreset()Resets this sketch to the empty state.voidupdate(double quantile)Updates this sketch with the given item.-
Methods inherited from class org.apache.datasketches.quantiles.DoublesSketch
builder, downSample, getCDF, getCompactSerialiedSizeBytes, getCurrentCompactSerializedSizeBytes, getCurrentUpdatableSerializedSizeBytes, getK, getKFromEpsilon, getMaxItem, getMinItem, getN, getNormalizedRankError, getNormalizedRankError, getNumRetained, getPMF, getQuantile, getQuantileLowerBound, getQuantiles, getQuantileUpperBound, getRank, getRankLowerBound, getRanks, getRankUpperBound, getSerializedSizeBytes, getSortedView, getUpdatableStorageBytes, hasMemory, isDirect, isEmpty, isEstimationMode, isSameResource, iterator, putMemory, putMemory, toByteArray, toByteArray, toString, toString, toString, toString, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.datasketches.quantilescommon.QuantilesDoublesAPI
getCDF, getPMF, getQuantile, getQuantiles, getRank, getRanks
-
-
-
-
Method Detail
-
heapify
public static CompactDoublesSketch heapify(org.apache.datasketches.memory.Memory srcMem)
-
isReadOnly
public boolean isReadOnly()
Description copied from interface:QuantilesAPIReturns true if this sketch is read only.- Specified by:
isReadOnlyin interfaceQuantilesAPI- Specified by:
isReadOnlyin classDoublesSketch- Returns:
- true if this sketch is read only.
-
reset
public void reset()
Description copied from class:DoublesSketchResets this sketch to the empty state. If the sketch is read only this does nothing.The parameter k will not change.
The parameter k will not change.
- Specified by:
resetin interfaceQuantilesAPI- Specified by:
resetin classDoublesSketch
-
update
public void update(double quantile)
Description copied from interface:QuantilesDoublesAPIUpdates this sketch with the given item.- Parameters:
quantile- from a stream of items. NaNs are ignored.
-
-