:mannotop CGO – manno的博客

标签: CGO

Golang RNG审查通过的洗牌实现

Introduce:

SFMT.h: This is the header file, which defines the interface for the RNG.

SFMT.c: This file contains the source code that implements the random number generator algorithm.

SFMT-params.h and SFMT-params19937.h: These files provide parameters for the Mersenne Twister  algorithm.

SFMT-common.h: Provides common or supportive functions for the algorithm

Knuth.go is used to implement shuffling

UniformIntDistribution.go is used to implement scaling