numz

package
v0.0.0-...-7706f2d Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs[N compare.Number](n N) N

Abs will return the absolut number of n

func BitAND

func BitAND[I compare.Integer](a []I) (i I)

BitAND returns the bit wise AND between elements in a vector

func BitOR

func BitOR[I compare.Integer](vector []I) (i I)

BitOR returns the bit wise OR between elements in a vector

func BitXOR

func BitXOR[I compare.Integer](a []I) (i I)

BitXOR returns the bit wise XOR between elements in a vector

func CastByte

func CastByte[N compare.Number](n N) byte

CastByte will cast n to an byte

func CastFloat32

func CastFloat32[N compare.Number](n N) float32

CastFloat32 will cast n to a float32

func CastFloat64

func CastFloat64[N compare.Number](n N) float64

CastFloat64 will cast n to a float64

func CastInt

func CastInt[N compare.Number](n N) int

CastInt will cast n to a int

func CastInt16

func CastInt16[N compare.Number](n N) int16

CastInt16 will cast n to a int16

func CastInt32

func CastInt32[N compare.Number](n N) int32

CastInt32 will cast n to a int32

func CastInt64

func CastInt64[N compare.Number](n N) int64

CastInt64 will cast n to a int64

func CastInt8

func CastInt8[N compare.Number](n N) int8

CastInt8 will cast n to a int8

func CastUInt

func CastUInt[N compare.Number](n N) uint

CastUInt will cast n to an uint

func CastUInt16

func CastUInt16[N compare.Number](n N) uint16

CastUInt16 will cast n to an uint16

func CastUInt32

func CastUInt32[N compare.Number](n N) uint32

CastUInt32 will cast n to an uint32

func CastUInt64

func CastUInt64[N compare.Number](n N) uint64

CastUInt64 will cast n to an uint64

func CastUInt8

func CastUInt8[N compare.Number](n N) uint8

CastUInt8 will cast n to an uint8

func Corr

func Corr[N compare.Number](x []N, y []N) float64

Corr returns the correlation between two vectors

func Cov

func Cov[N compare.Number](x []N, y []N) float64

Cov returns the co-variance between two vectors

func FTest

func FTest[N compare.Number](x []N, y []N) float64

FTest returns the F-Test of two vectors

func GCD

func GCD[I compare.Integer](vector ...I) (gcd I)

GCD returns the Greatest common divisor of a vector

func LCM

func LCM[I compare.Integer](a, b I, vector ...I) I

LCM return the Least Common Multiple of a vector

func LinReg

func LinReg[N compare.Number](x []N, y []N) (intercept, slope float64)

LinReg returns the liniar regression of two verctors such that y = slope*x + intercept

func MAD

func MAD[N compare.Number](vector ...N) float64

MAD will return the Mean Absolute Deviation of a vector

func Max

func Max[N compare.Number](a ...N) N

Max returns the maximum of the number supplied

func Mean

func Mean[N compare.Number](vector ...N) float64

Mean will return the mean of a vector

func Median

func Median[N compare.Number](vector ...N) float64

Median returns the median of a vector

func Min

func Min[N compare.Number](a ...N) N

Min returns the minimum of the number supplied

func Mode

func Mode[N compare.Number](vector ...N) N

Mode returns the mode of a vector

func Modes

func Modes[N compare.Number](vector ...N) []N

Modes return the modes of all numbers in the vector

func Negate

func Negate[N compare.Number](n N) N

Negate will return -1*n

func Percentile

func Percentile[N compare.Number](score N, vector ...N) float64

Percentile return "score" percentile of a vector

func R2

func R2[N compare.Number](x []N, y []N) float64

R2 returns the r^2 between two vectors

func Range

func Range[N compare.Number](a ...N) N

Range returns the range of the number supplied

func SNR

func SNR[N compare.Number](sample ...N) float64

SNR will return the Signal noise ratio of the vector

func Skew

func Skew[N compare.Number](sample ...N) float64

Skew will return the skew of a sample

func StdDev

func StdDev[N compare.Number](samples ...N) float64

StdDev will return the sample standard deviation

func StdErr

func StdErr[N compare.Number](n ...N) float64

StdErr will return the sample standard error

func Sum

func Sum[N compare.Number](a ...N) N

Sum returns the sum of the number supplied

func VAdd

func VAdd[N compare.Number](x []N, y []N) []N

VAdd will return a vector containing elements x and y added such that x[i]+y[i] = returned[i]

func VDot

func VDot[N compare.Number](x []N, y []N) N

VDot will return the dot product of two vectors

func VMul

func VMul[N compare.Number](x []N, y []N) []N

VMul will return a vector containing elements x and y multiplied such that x[i]*y[i] = returned[i]

func VPow

func VPow[N compare.Number](vector []N, pow N) []N

VPow returns a vector containing the result of each element of "vector" to the power och "pow"

func VSub

func VSub[N compare.Number](x []N, y []N) []N

VSub will return a vector containing elements y subtracted from x such that x[i]-y[i] = returned[i]

func Var

func Var[N compare.Number](samples ...N) float64

Var will return Variance of a sample

func ZScore

func ZScore[N compare.Number](x N, pop []N) float64

ZScore will return the z-score of vector

Types

This section is empty.

Jump to

Keyboard shortcuts

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