moveavg

package
v0.0.0-...-ac1e062 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidWindow   = fmt.Errorf("invalid window")
	ErrNotEnoughValues = fmt.Errorf("not enough values")
	ErrWindowTooBig    = fmt.Errorf("window too big")
)

Functions

This section is empty.

Types

type Averager

type Averager struct {
	// contains filtered or unexported fields
}

func NewAverager

func NewAverager(size int) *Averager

func (*Averager) Add

func (a *Averager) Add(v float64)

func (*Averager) MovingAverage

func (a *Averager) MovingAverage(n int) (float64, error)

Jump to

Keyboard shortcuts

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