mathutil

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsMin added in v0.2.5

func AbsMin(vals []float64) float64

AbsMin returns value with the min absolute value of float64 array

func Average

func Average(vals []float64) float64

Average returns the mean value of float64 values. Returns zero if the vals length is 0.

func Max added in v0.2.5

func Max(vals []float64) float64

Max returns the max value of float64 array

func Min added in v0.2.5

func Min(vals []float64) float64

Min returns the min value of float64 array

func Saturation added in v0.2.5

func Saturation(val, from, to float64) float64

Saturation returns val if min <= val <= max or

return max if val > max or
return min if val < min

func Score added in v0.2.5

func Score(last float64, avg float64, std float64) float64

Score returns the score of last value via 3-sigma,with an input avg and std.

states that nearly all values (99.7%) lie within the 3 standard deviations
of the mean in a normal distribution.

func StdAverage added in v0.2.5

func StdAverage(stds []float64, nums []int) float64

StdAverage return the pooled variance

func StdDev

func StdDev(vals []float64, avg float64) float64

StdDev returns the standard deviation of float64 values, with an input average. Returns zero if the vals length is 0.

func Sum added in v0.2.5

func Sum(vals []float64) float64

Sum return the summation value of float64 values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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