예제 #1
0
파일: randist.go 프로젝트: postfix/gsl-1
func GaussianRatioMethod(r *rng.GslRng, sigma float64) float64 {
	return float64(C.gsl_ran_gaussian_ratio_method((*C.gsl_rng)(unsafe.Pointer(r.Ptr())), C.double(sigma)))
}
예제 #2
0
// GaussianRatioMethod returns a Gaussian random variate, with mean zero and
// standard deviation sigma computed via the Kinderman-Monahan-Leva ratio
// method.
func GaussianRatioMethod(rng RngState, sigma float64) float64 {
	return float64(C.gsl_ran_gaussian_ratio_method(rng.state, C.double(sigma)))
}