utils

package
v0.0.0-...-cfa6b07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL