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
Click to show internal directories.
Click to hide internal directories.