runAvg

package
v0.0.0-...-26f96f3 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Calc

func Calc(data Interface, windowSize int) float64

Taking windowSize as a parameter to allow for sliding window implementation.

func Init

func Init()

Initialize the parameters of the running average calculator.

func Remove

func Remove(id string) (interface{}, error)

Remove element from the window if it is present.

Types

type Interface

type Interface interface {
	// Value to use for running average calculation.
	Val() float64
	// Unique ID.
	ID() string
}

Jump to

Keyboard shortcuts

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