Boost logo

Boost :

Subject: Re: [boost] How to generate a Bernuolli number under probablity p
From: Henning Basold (h.basold_at_[hidden])
Date: 2009-03-30 06:19:43

I think you've misunderstood the Bernoulli distribution. It just says
that there is a probability p for an event to happen an the probability
1 - p for its complementary. In Boost.Random you can give the generator
a probability and it generates these events. Internally I think it just
uses another random number generator.
So if you want number in the interval [0,1] you have to use the
appropriate generator for your use case.


Barco You schrieb:
> Hi,
> I want to randomly generate a Bernuolli number [0, 1],with probability p ~[0
> 1].
> How to do that with boost?
> Thanks!

Boost list run by bdawes at, gregod at, cpdaniel at, john at