Esempio n. 1
0
func Get(q *GslQrng, x []float64) int32 {
	_slice_header_1 := (*reflect.SliceHeader)(unsafe.Pointer(&x))
	return int32(C.gsl_qrng_get((*C.gsl_qrng)(unsafe.Pointer(q.Ptr())), (*C.double)(unsafe.Pointer(_slice_header_1.Data))))
}
Esempio n. 2
0
// Get returns the next point from the sequence generator s. The
// length of QrngPoint p matches the dimension of the underlying
// QrngState. Each element of QrngPoint p will lie in the range
// 0 < p_i < 1 for each p_i .
// XXX: The gsl manual does not say what the return value of
// gsl_qrng_get signifies so we ignore it for now.
func (s *QrngState) Get() QrngPoint {
	point := make(QrngPoint, s.dim)
	C.gsl_qrng_get(s.state, (*C.double)(&point[0]))
	return point
}