math

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Max

func Max[T constraints.Ordered](s []T) T

Max returns the maximum value in s.

func Mean

func Mean[T constraints.Integer | constraints.Float](s []T) T

Mean returns the mean value in s.

func Median

func Median[T constraints.Integer | constraints.Float](s []T) T

Median returns the median value in s. s must be sorted.

func Min

func Min[T constraints.Ordered](s []T) T

Min returns the minimum value in s.

func Percentile

func Percentile[T constraints.Integer | constraints.Float](s []T, p float64) T

Percentile returns the pth percentile value in s. s must be sorted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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