package
0.3.6
Repository: https://github.com/hopeio/utils.git
Documentation: pkg.go.dev

# Functions

BinarySearch 二分查找.
No description provided by the author
将切片按照某个key分类.
Deprecated: use std slices.Contains.
No description provided by the author
No description provided by the author
去重.
两个数组各自相对的差集,返回为A-B,B-A.
取差集,通过循环比较key.
取差集,返回为A-B.
指定key取差集,返回为A-B.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
遍历切片,参数为下标,利用闭包实现遍历.
No description provided by the author
No description provided by the author
No description provided by the author
没有泛型,范例,实际需根据不同类型各写一遍,用CmpKey,基本类型又用不了,go需要能给基本类型实现方法不能给外部类型实现方法 1.20以后字段均是comparable的结构体也是comparable的 判断是否有重合元素.
No description provided by the author
取交集.
默认保留前一个的,靠前的元素.
No description provided by the author
No description provided by the author
No description provided by the author
Calculate the Mean of a slice of floats.
Calculate the Median of a slice of floats.
No description provided by the author
有序数组取交集.
No description provided by the author
go:nosplit.
No description provided by the author
No description provided by the author
No description provided by the author
默认保留先遍历到的.
No description provided by the author
Remove outliers using the MAD method and calculate the Mean of the remaining data.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
将切片转换为map.
No description provided by the author
No description provided by the author
取并集.
交集和差集,返回A∪B A∩B,A-B,B-A.
默认保留第一个的,靠前的.
No description provided by the author

# Constants

No description provided by the author

# Structs

No description provided by the author