|
Boost : |
Subject: Re: [boost] How to generate a Bernuolli number
From: Peter Bartlett (pete_at_[hidden])
Date: 2009-03-31 04:03:54
Quoting Barco You <barcojie_at_[hidden]>:
> Hi,
>
> Sorry, wait!!!
> [...]
In the first case one variate_generator is constructed and it is used
10 times.
In the second case 10 variate_generators are contructed and each used
once. Since they are default constructed, they are each primed to
return the same sequence. In particular they return the same first
number, 0.
Pete
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk