numeric

package
v0.0.0-...-3022a63 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package numeric contains stream processing functions that * can be called on numeric data types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Avg

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

func NewAvg

func NewAvg() *Avg

func (*Avg) Add

func (m *Avg) Add(v float64)

func (*Avg) Remove

func (m *Avg) Remove(v float64)

func (*Avg) Reset

func (m *Avg) Reset()

func (*Avg) Result

func (m *Avg) Result() (float64, error)

type Correlation

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

func NewCorrelation

func NewCorrelation() *Correlation

func (*Correlation) Add

func (m *Correlation) Add(x, y float64)

func (*Correlation) Remove

func (m *Correlation) Remove(x, y float64)

func (*Correlation) Reset

func (m *Correlation) Reset()

func (*Correlation) Result

func (m *Correlation) Result() (float64, error)

type Covariance

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

func NewCovariance

func NewCovariance() *Covariance

func (*Covariance) Add

func (m *Covariance) Add(x, y float64)

func (*Covariance) Remove

func (m *Covariance) Remove(x, y float64)

func (*Covariance) Reset

func (m *Covariance) Reset()

func (*Covariance) Result

func (m *Covariance) Result() (float64, error)

type IStream

type IStream interface {

	// Add adds a value to the algorithm.
	Add(v float64)

	// Remove removes the value from the algorithm.
	Remove(v float64)

	// Result produces result of the algorithm and error.
	Result() (float64, error)

	// Reset clears the stream algorithm's inner state.
	Reset()
}

IStream defines a streaming data processing math algorithm's interface.

type Mode

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

func NewMode

func NewMode() *Mode

func (*Mode) Add

func (md *Mode) Add(v float64)

func (*Mode) Remove

func (md *Mode) Remove(v float64)

func (*Mode) Reset

func (md *Mode) Reset()

func (*Mode) Result

func (md *Mode) Result() (float64, error)

type PValue

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

func NewPValue

func NewPValue() *PValue

func (*PValue) Add

func (m *PValue) Add(x, y float64)

func (*PValue) Remove

func (m *PValue) Remove(x, y float64)

func (*PValue) Reset

func (m *PValue) Reset()

func (*PValue) Result

func (m *PValue) Result() (float64, error)

type Sum

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

func NewSum

func NewSum() *Sum

func (*Sum) Add

func (s *Sum) Add(v interface{})

func (*Sum) Remove

func (s *Sum) Remove(v interface{})

func (*Sum) Reset

func (s *Sum) Reset()

func (*Sum) Result

func (s *Sum) Result() (interface{}, error)

type Variance

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

Calculates ** Population Variance **

func NewVariance

func NewVariance() *Variance

func (*Variance) Add

func (m *Variance) Add(v float64)

func (*Variance) Remove

func (m *Variance) Remove(v float64)

func (*Variance) Reset

func (m *Variance) Reset()

func (*Variance) Result

func (m *Variance) Result() (float64, error)

Jump to

Keyboard shortcuts

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