예제 #1
0
파일: randist.go 프로젝트: postfix/gsl-1
func Levy(r *rng.GslRng, c float64, alpha float64) float64 {
	return float64(C.gsl_ran_levy((*C.gsl_rng)(unsafe.Pointer(r.Ptr())), C.double(c), C.double(alpha)))
}
예제 #2
0
// Levy returns a random variate from the Levy symmetric stable distribution
// with scale c and exponent alpha.
// XXX: The algorithm only works for 0 < alpha <= 2
func Levy(rng RngState, c, alpha float64) float64 {
	return float64(C.gsl_ran_levy(rng.state, C.double(c), C.double(alpha)))
}