
30 Mar
2009
30 Mar
'09
10:19 a.m.
Hi, 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. Henning 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!