Documentation ¶
Overview ¶
Package percentile provides a pure go implementation of tDigest aggregation and the computation of percentiles
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CentroidsT ¶
type CentroidsT []centroidT
CentroidsT is sorted by the mean of the centroidT, ascending.
func (CentroidsT) Len ¶
func (c CentroidsT) Len() int
type TDigest ¶
type TDigest struct { Data CentroidsT TotalWeight weightT // total TotalWeight of all centroids Min, Max weightT }
func NewTDigest ¶
func (*TDigest) Merge ¶
Merge of two TDigest structures is nothing more than add the centroids of one tDigest to the centroids of the other tDigest
func (*TDigest) Percentile ¶
Percentile returns the (approximate) Percentile of the distribution. Accepted values for q are between 0.0 and 1.0. Returns NaN if count is zero or bad inputs.
func (*TDigest) Percentiles ¶
Click to show internal directories.
Click to hide internal directories.