common_calc

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: MIT Imports: 10 Imported by: 2

README

common_calc

通用计算模块

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsMax

func AbsMax(input []float64) float64

func CalculateFormula

func CalculateFormula(formulaExpression string) float64

func Decimal

func Decimal(value float64, prec int) float64

Decimal float64 保留小数点后位数 value float64 浮点数 prec int 需保留小数点后的位数

func GetAvg

func GetAvg(dataArray []float64) float64

func GetMedian

func GetMedian(dataArray []float64) float64

func GetVariance

func GetVariance(samples []float64) float64

GetVariance calculates the unbiased population variance from the provided samples as an unsorted array. On a dataset of size N, it will use an N-1 normalizer (Bessel's correction). Returns NaN if data has less than two entries or if any entry is NaN. 方差 Translated from Math.Net Source code at https://github.com/mathnet/mathnet-numerics/blob/master/src/Numerics/Statistics/ArrayStatistics.cs

func MeanSqrt

func MeanSqrt(data []float64) float64

func MeanStandardDeviation

func MeanStandardDeviation(samples []float64) (float64, float64)

func MinMax

func MinMax(input []float64) (float64, float64)

func NameUUIDFromString

func NameUUIDFromString(raw string) string

func StandardDeviation

func StandardDeviation(samples []float64) float64

func UUIDFromString

func UUIDFromString(raw string) string

和scala 计算不一致 注意!

Types

type Stack

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

func (*Stack) IsEmpty

func (s *Stack) IsEmpty() bool

func (*Stack) Pop

func (s *Stack) Pop() (d string)

func (*Stack) Push

func (s *Stack) Push(d string)

func (*Stack) Top

func (s *Stack) Top() (d string)

Jump to

Keyboard shortcuts

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