[Rcpp-devel] Mersenne Twister in RcppArmadillo?
Simon Zehnder
szehnder at uni-bonn.de
Sat Mar 2 22:40:58 CET 2013
That was fast Dirk! I will update my packages on Monday! Thank you for that quick release!
Best
Simon
On Mar 2, 2013, at 4:56 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 3 March 2013 at 01:09, Conrad S wrote:
> | Hi everyone,
> |
> | In Armadillo 3.800 I've added .imbue(), allowing a matrix to be filled
> | using a functor or C++11 lambda expression. This allows the use of the
> | Mersenne twister random number engine built into C++11. For example:
> |
> | std::mt19937 engine;
> | std::uniform_real_distribution<double> distr(0.0, 1.0);
> |
> | arma::mat X(4,5);
> | X.imbue( [&]() { return distr(engine); } );
>
> Nice. I should time this / update the timing example on the Rcpp Gallery.
>
> | More information at:
> | http://arma.sourceforge.net/docs.html#imbue
> |
> | Dirk is likely to release the corresponding RcppArmadillo version soon.
>
> (He did yesterday morning; it is now on CRAN. "They" had to deliberate for 20
> hours whether we would be allowed in having violated the 'no more than six
> releases in six months' preference.)
>
> Dirk
>
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list