synopsis

package
v0.0.0-...-4fdfd55 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SmoothedSeries

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

SmoothedSeries compresses time series data by representing it as a sequence of averages

func ExponentialSmoothedSeries

func ExponentialSmoothedSeries(n, k int) *SmoothedSeries

ExponentialSmoothedSeries tracks a smoothed history of length k * (2^n - 1) using k*n values

func NewSmoothedSeries

func NewSmoothedSeries(n int, capFn func(int) int) *SmoothedSeries

NewSmoothedSeries is a constructor for SmoothedSeries

func (*SmoothedSeries) Insert

func (s *SmoothedSeries) Insert(values ...float64)

Insert inserts a sequence of values into the SmoothedSeries, in the order they are provided.

func (*SmoothedSeries) Mean

func (s *SmoothedSeries) Mean() float64

Mean returns the average value

func (*SmoothedSeries) Rescale

func (s *SmoothedSeries) Rescale(scale float64)

Rescale multiplies all of the data by a constant factor

func (*SmoothedSeries) SetData

func (s *SmoothedSeries) SetData(data []float64)

SetData sets the data slice

Jump to

Keyboard shortcuts

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