Home » PANDA » PandaRoot » Event Generators » simpleEvtGen default EvtRandomEngine
Re: simpleEvtGen default EvtRandomEngine - PndMTRandomEngine Suggestion [message #9240 is a reply to message #9239] |
Wed, 26 August 2009 17:22 |
Elwin Dijck
Messages: 16 Registered: June 2009 Location: Groningen, The Netherland...
|
occasional visitor |
From: *KVI.nl
|
|
Hello all,
Perhaps you found this out already, but it seems that actually the Boost interface has changed: they initialize the Mersenne Twister (which actually needs a few hundred integers as initialization) now in a different way than in older versions. Instead of using a single integer, they want a function/functor that gives a sequence of values to initialize the internal state of the Mersenne Twister.
The Boost documentation says "The seeding from an integer was changed in April 2005 to address a weakness." and refers to here.
Also see how ROOT initializes the Mersenne Twister.
So casting will not help, for the newer Boost versions the argument to seed() must be a function or functor. Simplest is to make a small class that has an operator() that just returns the seed number, though it might be better to use one of the more advanced schemes.
Best regards,
Elwin Dijck
|
|
|
Goto Forum:
Current Time: Sun Nov 24 12:29:03 CET 2024
Total time taken to generate the page: 0.00752 seconds
|