Documentation ¶
Overview ¶
Package ewma implements exponentially weighted moving averages(EWMA). See https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average for formal definitions.
Index ¶
Constants ¶
View Source
const ( // DefaultWeightingFactor is the default smoothing factor α // The value 0.875 is used in TCP RTT estimation DefaultWeightingFactor = 0.875 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EWMA ¶
type EWMA struct {
// contains filtered or unexported fields
}
EWMA is the class to calculate exponentially weighted moving average of a series of data
func NewEWMA ¶
NewEWMA returns a EWMA object which can calculate EWMA of a series of data gradually added to it
func (*EWMA) AddValue ¶
AddValue adds a new data point into the EWMA calculation, by which the EWMA is automatically updated
Click to show internal directories.
Click to hide internal directories.