maths

package
v0.0.0-...-e67ccf8 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(n int) int

func AbsInt32

func AbsInt32(a int32) int32

func AbsInt64

func AbsInt64(a int64) int64

func Combination

func Combination(n, m int) (combs [][]int)

Combination 从src中选取length个元素出来 组合是一个基本的数学问题,本程序的目标是输出从n个元素中取m个的所有组合。 例如从[1,2,3]中取出2个数,一共有3中组合:[1,2],[1,3],[2,3]。(组合不考虑顺序,即[1,2]和[2,1]属同一个组合) 从n中选取m个组合 例如: 从make([]int, 10)中选取5个元素的所有组合,此时n=10, m=5 返回的combination为为每个元素的索引组成的二维切片

func Even

func Even(m int) bool

func MaxInt

func MaxInt(a, b int) int

func MaxInt32

func MaxInt32(a, b int32) int32

func MaxInt64

func MaxInt64(a, b int64) int64

func MinInt

func MinInt(a, b int) int

func MinInt32

func MinInt32(a, b int32) int32

func MinInt64

func MinInt64(a, b int64) int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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