#include <random.h>
Public Types | |
typedef boost::mt19937::result_type | result_type |
Static Public Member Functions | |
static RandomEngine & | instance () |
static RandomEngine & | instance (result_type value) |
template<class Generator> | |
static RandomEngine & | instance (Generator &gen) |
Private Member Functions | |
RandomEngine () |
This class was created so that the underlying generator can be exchanged easily. Making this class a singleton prevents initializing the generator more than once (which can be expensive).
The only thing users should do with this class is to set the seed of the generator. To actually create random numbers, use one of the Random Number Generator Classes that map the numbers to a specific distribution and provide an operator()() to access random numbers.
Definition at line 45 of file random.h.
|
|
|
|
|
|
|
|
|
Definition at line 50 of file random.h. Referenced by zeitgeist::RandomServer::Seed(). |