
6 Jun
2007
6 Jun
'07
8:12 a.m.
On 05/06/07, Peter Dimov <pdimov@mmltd.net> 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? So for seeding one could do something like: uuid_generator() { init rd; numBytesInSeed = numBytesNeededFor(Engine::max_value() - Engine::min_value()); en_.seed(rd, rd + numBytesInSeed); } Regards, Jos