Example #1
0
// UniformPos function returns a positive double precision floating point
// number uniformly distributed in the range (0,1), excluding both 0.0 and
// 1.0. The number is obtained by sampling the generator with the algorithm
// of Uniform until a non-zero value is obtained. You can use this function
// if you need to avoid a singularity at 0.0.
func (s *RngState) UniformPos() float64 {
	return float64(C.gsl_rng_uniform_pos(s.state))
}
Example #2
0
func UniformRandomPos(rng *RNG) float64 {
	return float64(C.gsl_rng_uniform_pos(rng.g))
}
Example #3
0
File: rng.go Project: postfix/gsl-1
func UniformPos(r *GslRng) float64 {
	return float64(C.gsl_rng_uniform_pos((*C.gsl_rng)(unsafe.Pointer(r.Ptr()))))
}
Example #4
0
// UniformPos returns a uniform random number between (0,1)
func (r *RNG) UniformPos() float64 {
	return float64(C.gsl_rng_uniform_pos(r.rng))
}