Package com.tdunning.math.stats
Class AbstractTDigest
java.lang.Object
com.tdunning.math.stats.TDigest
com.tdunning.math.stats.AbstractTDigest
- Direct Known Subclasses:
ArrayDigest,AVLTreeDigest,TreeDigest
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double x) Adds a sample to a histogram.voidAdd all of the centroids of another TDigest to this one.abstract voidprotected CentroidcreateCentroid(double mean, int id) static intdecode(ByteBuffer buf) static voidencode(ByteBuffer buf, int n) static doubleinterpolate(double x, double x0, double x1) booleanprotected static TDigestSets up so that all centroids will record all data assigned to them.Methods inherited from class com.tdunning.math.stats.TDigest
add, asBytes, asSmallBytes, byteSize, cdf, centroidCount, centroids, checkValue, compress, compression, createArrayDigest, createArrayDigest, createTreeDigest, quantile, size, smallByteSize
-
Field Details
-
gen
-
recordAllData
protected boolean recordAllData
-
-
Constructor Details
-
AbstractTDigest
public AbstractTDigest()
-
-
Method Details
-
interpolate
public static double interpolate(double x, double x0, double x1) -
encode
-
decode
-
merge
-
compress
-
recordAllData
Sets up so that all centroids will record all data assigned to them. For testing only, really.- Specified by:
recordAllDatain classTDigest- Returns:
- This TDigest so that configurations can be done in fluent style.
-
isRecording
public boolean isRecording()- Specified by:
isRecordingin classTDigest
-
add
public void add(double x) Adds a sample to a histogram. -
add
Description copied from class:TDigestAdd all of the centroids of another TDigest to this one. -
createCentroid
-