Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2007-06-12 04:11:28

On Jun 11, 2007, at 8:33 PM, Andy wrote:

> "Jos Hickson" <jos.hickson_at_[hidden]> wrote in
> news:fc03d05a0706060823v59628c64xd1bcda61e9fd5f48_at_[hidden]:
>> On 06/06/07, Peter Dimov <pdimov_at_[hidden]> wrote:
>>> Jos Hickson wrote:
>>>> On 05/06/07, Peter Dimov <pdimov_at_[hidden]> wrote:
>>>>> [snip] ... and if Engine
>>>>> is a template parameter, we probably need to support engines that
>>>>> only take a 32 bit seed anyway.
>>>> Isn't it the case that the maximum seed size is related (equal?) to
>>>> the difference between the max and min values produced by a
>>>> particular engine and also that all the engines in Boost Random
>>>> provide the iterator version of seed?
>>> The seed for mt19937 is 624 words.
>> Aah, a bit bigger then!
> I have been thinking about this for awhile now, and maybe I should use
> Peter's suggestion and only support random number generators that
> can be
> seeded with a single number. And xor with rd_.

Please don't! As mentioned before that would only give 2^32 different

The best solution is just to allow any generator producing values of
a specified type (e.g. unsigned int or unsigned char) to be used with
create(), and leave the initialization of the generator to the user.


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