Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlidingAverage ¶
type SlidingAverage struct {
// contains filtered or unexported fields
}
SlidingAverage implements a decaying moving average.
func NewSlidingAverage ¶
func NewSlidingAverage() *SlidingAverage
func (*SlidingAverage) Add ¶
func (sa *SlidingAverage) Add(sample int)
func (*SlidingAverage) Avg ¶
func (sa *SlidingAverage) Avg() float64
Click to show internal directories.
Click to hide internal directories.