|
Boost : |
From: Jos Hickson (jos.hickson_at_[hidden])
Date: 2007-06-06 04:12:28
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? 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk