Example #1
0
// 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))
}
Example #2
0
File: rng.go Project: postfix/gsl-1
func Get(r *GslRng) int {
	return int(C.gsl_rng_get((*C.gsl_rng)(unsafe.Pointer(r.Ptr()))))
}
Example #3
0
func UniformGet(rng *RNG) int {
	return int(C.gsl_rng_get(rng.g))
}
Example #4
0
func (r *RNG) Int63() int64 {
	return int64(C.gsl_rng_get(r.g))
}
Example #5
0
// Get returns a random integer
func (r *RNG) Get() int64 {
	return int64(C.gsl_rng_get(r.rng))
}