예제 #1
0
파일: randist.go 프로젝트: postfix/gsl-1
func GammaKnuth(r *rng.GslRng, a float64, b float64) float64 {
	return float64(C.gsl_ran_gamma_knuth((*C.gsl_rng)(unsafe.Pointer(r.Ptr())), C.double(a), C.double(b)))
}
예제 #2
0
// GammaKnuth returns a random variate from the gamma distribution using the
// algorithms from Knuth.
func GammaKnuth(rng RngState, a, b float64) float64 {
	return float64(C.gsl_ran_gamma_knuth(rng.state, C.double(a), C.double(b)))
}