示例#1
0
// Uniform returns a double precision floating point number
// uniformly distributed in the range [0,1). The range includes 0.0
// but excludes 1.0.
func (s *RngState) Uniform() float64 {
	return float64(C.gsl_rng_uniform(s.state))
}
示例#2
0
func UniformRandomFloat64(rng *RNG) float64 {
	return float64(C.gsl_rng_uniform(rng.g))
}
示例#3
0
文件: rng.go 项目: postfix/gsl-1
func Uniform(r *GslRng) float64 {
	return float64(C.gsl_rng_uniform((*C.gsl_rng)(unsafe.Pointer(r.Ptr()))))
}
示例#4
0
文件: random.go 项目: npadmana/gslgo
// Uniform returns a uniform random number between [0,1)
func (r *RNG) Uniform() float64 {
	return float64(C.gsl_rng_uniform(r.rng))
}