$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] How to generate a Bernuolli number
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-03-31 21:09:56
AMDG
Barco You wrote:
> Hi Henning,
>
> Thanks for your reply!
> but,
> g = generator(rng, boost::bernoulli_distribution<>(p));
>
Try
g.distribution() = boost::bernoulli_distribution<>(p);
or just construct the variate generator whenever you need
a random number:
std::cout << generator(rng, boost::bernoulli_distribution<>(p))() <<
std::endl;
In Christ,
Steven Watanabe