Skip to content
Prev 1163 / 10988 Next

[Rcpp-devel] Rcpp bug with rgamma

Le 03/10/10 23:29, Dirk Eddelbuettel a ?crit :
In addition, we have the RNGScope class, whose constructor calls 
GetRNGstate and destruvctor calls PutRNGstate, so that you can do :

fx <- cxxfunction( , '
	RNGScope scope ;
	NumericVector x = rgamma( 10, 1, 1 ) ;
	return x ;
', plugin = "Rcpp" )

fx()

Romain