AIToolbox
A library that offers tools for AI problem solving.
|
This class is an internal class used to seed all random engines in the library. More...
#include <AIToolbox/Seeder.hpp>
Static Public Member Functions | |
static unsigned | getSeed () |
This function gets a random number to seed generators. More... | |
static void | setRootSeed (unsigned seed) |
This function sets the seed for the seed generator. More... | |
static unsigned | getRootSeed () |
This function returns the root seed of Seeder. More... | |
This class is an internal class used to seed all random engines in the library.
To avoid seeding all generators with a single seed equal to the current time, only this class is setup with the time seed, while all others are seeded with numbers generated from this class to obtain maximum randomness.
|
static |
This function returns the root seed of Seeder.
This works even if it has not been set manually. In this way it is possible to log the original seed of a run to replicate it.
|
static |
This function gets a random number to seed generators.
|
static |
This function sets the seed for the seed generator.
By default the generator is seeded with the current time. If this is not satisfactory, due for example to the need of having reproducible experiments, this function can be called in order to seed the underlying generator.
seed | The seed for the underlying generator. |