예제 #1
0
파일: random.go 프로젝트: haskelladdict/gsl
// 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))
}
예제 #2
0
파일: uniform.go 프로젝트: mingzhi/gsl-cgo
func UniformRandomPos(rng *RNG) float64 {
	return float64(C.gsl_rng_uniform_pos(rng.g))
}
예제 #3
0
파일: rng.go 프로젝트: postfix/gsl-1
func UniformPos(r *GslRng) float64 {
	return float64(C.gsl_rng_uniform_pos((*C.gsl_rng)(unsafe.Pointer(r.Ptr()))))
}
예제 #4
0
파일: random.go 프로젝트: npadmana/gslgo
// UniformPos returns a uniform random number between (0,1)
func (r *RNG) UniformPos() float64 {
	return float64(C.gsl_rng_uniform_pos(r.rng))
}