Documentation ¶
Index ¶
- Variables
- func Average(ds []math.LegacyDec) (math.LegacyDec, error)
- func Max(ds []math.LegacyDec) (math.LegacyDec, error)
- func Median(ds []math.LegacyDec) (math.LegacyDec, error)
- func MedianDeviation(median math.LegacyDec, ds []math.LegacyDec) (math.LegacyDec, error)
- func Min(ds []math.LegacyDec) (math.LegacyDec, error)
- func NewDecFromFloat(f float64) (math.LegacyDec, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyList = fmt.Errorf("empty price list passed in")
Functions ¶
func Average ¶
Average returns the average value of a list of math.LegacyDec. Returns error if ds is empty list.
func Max ¶
Max returns the max value of a list of math.LegacyDec. Returns error if ds is empty list.
func Median ¶
Median returns the median of a list of math.LegacyDec. Returns error if ds is empty list.
func MedianDeviation ¶
MedianDeviation returns the standard deviation around the median of a list of math.LegacyDec. Returns error if ds is empty list. MedianDeviation = ∑((d - median)^2 / len(ds))
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.