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