예제 #1
0
파일: random.go 프로젝트: haskelladdict/gsl
// Get returns a random integer from the generator s. The minimum and
// maximum values depend on the algorithm used, but all integers in the
// range [min,max] are equally likely. The values of min and max can be
// determined using the auxiliary functions Max and Min.
func (s *RngState) Get() uint64 {
	return uint64(C.gsl_rng_get(s.state))
}
예제 #2
0
파일: rng.go 프로젝트: postfix/gsl-1
func Get(r *GslRng) int {
	return int(C.gsl_rng_get((*C.gsl_rng)(unsafe.Pointer(r.Ptr()))))
}
예제 #3
0
파일: uniform.go 프로젝트: mingzhi/gsl-cgo
func UniformGet(rng *RNG) int {
	return int(C.gsl_rng_get(rng.g))
}
예제 #4
0
func (r *RNG) Int63() int64 {
	return int64(C.gsl_rng_get(r.g))
}
예제 #5
0
파일: random.go 프로젝트: npadmana/gslgo
// Get returns a random integer
func (r *RNG) Get() int64 {
	return int64(C.gsl_rng_get(r.rng))
}