$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Neal D. Becker (ndbecker2_at_[hidden])
Date: 2004-02-11 12:54:28
For the new random number generators, if I want to share a single underlying
uniform random generator, I need to do like so:
typedef boost::mt19937 rng_t;
rng_t rng;
boost::variate_generator<rng_t&, boost::normal_distribution<> > tn (rng,
boost::normal_distribution<> (0, sqrt (var)));
boost::variate_generator<rng_t&, boost::pnseq_generator<1> > pn (rng,
boost::pnseq_generator<1>());
That is, I need to say "rng_t&" for the 1st template param rather than
"rng_t". Is this correct?
The old rng lib passed the engine by ref in the constructor, but the new one
doesn't. Correct?