包含头文件
#include <core.hpp>
//返回随机int的函数原型
//! returns a random integer sampled uniformly from [0, N).
unsigned operator ()(unsigned N);
例子:RNG rng=theRNG();
unsigned int rand_num = rng(256); //返回[0,256)之间的随机数
//! returns uniformly distributed integer random number from [a,b) range//返回[a,b)的int随机数
int uniform(int a, int b);
例子:RNG rng=theRNG();
int rand_num = rng.uniform(0,100); //返回[0,100)之间的随机数
//! returns uniformly distributed floating-point random number from [a,b) range//返回[a,b)的float类型随机数
float uniform(float a, float b);
例子:RNG rng=theRNG();
float rand_num = rng.uniform(0,1.0); //返回[0,1.0)之间的随机数
//! returns uniformly distributed double-precision floating-point random number from [a,b) range//返回[a,b)的double类型随机数
double uniform(double a, double b);
例子:RNG rng=theRNG();
double rand_num = rng.uniform(0,1.0); //返回[0,1.0)之间的随机数
//! returns Gaussian random variate with mean zero.//返回均值为0的高斯随机数
double gaussian(double sigma);//sigma为标准差
例子:RNG rng=theRNG();
double rand_num = rng.gaussian(1); //返回均值为0标准差为1的高斯随机数