Documentation
¶
Overview ¶
* @Author: cnzf1 * @Date: 2022-12-13 12:02:38 * @LastEditors: cnzf1 * @LastEditTime: 2023-01-09 17:16:59 * @Description:
* @Author: cnzf1 * @Date: 2021-10-15 17:30:22 * @Last Modified by: cnzf1 * @Last Modified time: 2021-10-15 17:33:25
* @Author: cnzf1 * @Date: 2022-11-25 16:29:40 * @LastEditors: cnzf1 * @LastEditTime: 2022-11-25 16:29:51 * @Description:
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcEntropy ¶
CalcEntropy calculates the entropy of m.
func GenerateRandomStr ¶
GenerateRandomStr return a random string, size specify the string length.
func PrintFisrt0BitNum ¶
从低位开始,获取s中的第一个为0的位所代表的整数 比如s=3(0011)返回4; 若s=6(0110)返回1
func PrintFisrt1BitNum ¶
从低位开始,获取s中的第一个为1的位所代表的整数 比如s=3(0011)返回1; 若s=6(0110)返回2
Types ¶
type Unstable ¶
type Unstable struct {
// contains filtered or unexported fields
}
A Unstable is used to generate random value around the mean value base on given deviation.
func (Unstable) AroundDuration ¶
AroundDuration returns a random duration with given base and deviation.