PaGMO
1.1.5
|
Generic thread-safe generator of pseudo-random number generators. More...
#include <rng.h>
Static Public Member Functions | |
template<class Rng > | |
static Rng | get () |
Return pseudo-random number generator. More... | |
static void | set_seed (int) |
Set seed. More... | |
Generic thread-safe generator of pseudo-random number generators.
To use, call the static member get() to get a pseudo-random number generator seeded with an initial pseudo-random value.
Implementation internally uses a mutex, so that this generator can be safely called concurrently from multiple threads. The initial seed used is the number of microseconds elapsed since 01/01/1970, cast to uint32_t.
|
static |
Return pseudo-random number generator.
Type Rng must be a Boost-like pseudo-random number generator initialisable with a boost::uint32_t. Return value is seeded with an internal static pagmo::rng_uint32.
|
static |