Boost logo

Boost :

Subject: Re: [boost] How to generate a Bernuolli number
From: Barco You (barcojie_at_[hidden])
Date: 2009-03-31 21:18:17


Hi Steven,

This way: g.distribution() = boost::bernoulli_distribution<>(p); works
successfully!!!

Many thanks!

On Wed, Apr 1, 2009 at 9:09 AM, Steven Watanabe <watanabesj_at_[hidden]>wrote:

> 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
>
> _______________________________________________
>
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>

-- 
-------------------------------
Enjoy life!
Barco You

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk