Пример #1
0
func Exponential(r *rng.GslRng, mu float64) float64 {
	return float64(C.gsl_ran_exponential((*C.gsl_rng)(unsafe.Pointer(r.Ptr())), C.double(mu)))
}
Пример #2
0
func ExponentialRandomFloat64(rd *RNG, lambda float64) (x float64) {
	x = float64(C.gsl_ran_exponential(rd.g, C.double(lambda)))
	return x
}
Пример #3
0
// Exponential returns a random variate from the exponential distribution with mean mu.
func Exponential(rng RngState, mu float64) float64 {
	return float64(C.gsl_ran_exponential(rng.state, C.double(mu)))
}