maths

package module
v0.0.0-...-5b7569c Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 1 Imported by: 0

README

maths

介绍

数学方法的一些封装。

目前封装的函数有一下:

func Sum[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

求取累加和
func EachReduceAvgSquareSums[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

求每个数减去平均数的平方和。
func ArithmeticAverage[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

求取数组的算术平均值
func PopulationVariance[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

求取数组的总体方差
func SampleVariance[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

求取数组的样本方差
func OverallStandardDeviation[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

求取数组的总体标准差。
func SampleStandardDeviation[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

求取数组的样本标准差。

使用说明

go version >= 1.18

go mod 模式直接使用以下命令安装。

go get -u gitee.com/RocsSun/maths

在代码中使用。

import "gitee.com/RocsSun/maths"

参与贡献

欢迎大佬补充函数。

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArithmeticAverage

func ArithmeticAverage[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

ArithmeticAverage 求取数组的算术平均值

func CoefficientOfVariation

func CoefficientOfVariation[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

CoefficientOfVariation 计算样本但而变异系数。

func EachReduceAvgSquareSums

func EachReduceAvgSquareSums[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

EachReduceAvgSquareSums 求每个数减去平均数的平方和。

func OverallStandardDeviation

func OverallStandardDeviation[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

OverallStandardDeviation 总体标准差。

func PopulationVariance

func PopulationVariance[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

PopulationVariance 总体方差

func SampleStandardDeviation

func SampleStandardDeviation[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

SampleStandardDeviation 样本标准差。

func SampleVariance

func SampleVariance[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

SampleVariance 样本方差

func Sum

func Sum[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

Sum 求和。

Types

This section is empty.

Jump to

Keyboard shortcuts

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