úÎ+1(9      !"#$%&'()*+,-./012345678None,<=DT is a tree of centroids. compression is a 1/´. The greater the value of  compression, the less likely value merging will happen. Tree node Empty tree Total count of samples.+totalWeight (tdigest [1..100] :: TDigest 3)100.0 OCenter of left-most centroid. Note: may be different than min element inserted.,minimumValue (tdigest [1..100] :: TDigest 3)1.0 PCenter of right-most centroid. Note: may be different than max element inserted.,maximumValue (tdigest [1..100] :: TDigest 3)99.03Constructor which calculates size and total weight.Balance after right insertion.Balance after left insertion. Alias to Create singular node. Add two weighted means together.9Calculate the threshold, i.e. maximum weight of centroid. Compress .kReinsert the centroids in "better" order (in original paper: in random) so they have opportunity to merge.;Compression will happen only if size is both: bigger than  * comp and bigger than .BPerform compression, even if current size says it's not necessary..Relative size parameter. Hard-coded value: 25.0Absolute size parameter. Hard-coded value: 1000. 9 .  Check various invariants in the  tree.#Insert single value into .$$Insert single value, don't compress  even if needed.2For sensibly bounded input, it makes sense to let I grow (it might grow linearly in size), and after that compress it once.%Make a  of a single data point.&Strict : over ; structure.'G isn't compressed after de-serialisation, but it can be still smaller.( has only strict fields.*Both < and = are #,  total weightquantilecompression (1/´)t-Digest@return also a "space left in the centroid" value for "shuffling" !"#element$element%&'()*+'  !"#$%&,+*)('  !"#$%&*  !"#$%&'()*+None - Histogram bin/ lower bound0 upper bound1weight ("area" of the bar)2weight from the right3!Calculate histogram based on the .4 Median, i.e. 5 0.5.5'Calculate quantile of a specific value.6 Alias of 5.7!Cumulative distribution function.Note:Q if this is the only thing you need, it's more efficient to count this directly. -./01234567 -./01234567 3-./0124576-./01234567NoneT #$%&-./01234567&%#$ 3-./0124576>      !"#$%&'()*+,-./01123456789:;<=><?@<?ABCDBCEF tdigest-0-2dqQoDEysB0I5rkRTrXhEJData.TDigest.Internal.TreeData.TDigest.Postprocess Data.TDigestTDigestNodeNilSizeCentroidWeightMeanassert getCentroids totalWeightsize minimumValue maximumValue emptyTDigest combineDigestinsertCentroidnodebalanceRbalanceLnode'singNodecombinedCentroid thresholdcompress forceCompress toMVector relMaxSize absMaxSizebalOmegabalAlphavalidvalidateeqnegInfposInfinsertinsert' singletontdigest$fBinaryTDigest$fNFDataTDigest$fMonoidTDigest$fReducerDoubleTDigest$fSemigroupTDigest $fShowTDigestHistBinhbMinhbMaxhbWeight hbCumWeight histogrammedianquantileicdfcdf $fShowHistBinbase Data.EitherisRight Data.Foldablefoldl'Foldable&reducers-3.12.1-BxtUharzyhUHHszNNPz3aMData.Semigroup.Reducerconssnoc