AIToolbox
A library that offers tools for AI problem solving.
Seeder.hpp
Go to the documentation of this file.
1 #ifndef AI_TOOLBOX_SEEDER_HEADER_FILE
2 #define AI_TOOLBOX_SEEDER_HEADER_FILE
3 
4 #include <random>
5 #include <AIToolbox/Types.hpp>
6 
7 namespace AIToolbox {
15  class Seeder {
16  public:
22  static unsigned getSeed();
23 
34  static void setRootSeed(unsigned seed);
35 
44  static unsigned getRootSeed();
45 
46  private:
47  Seeder();
48 
49  static Seeder instance_;
50 
51  unsigned rootSeed_;
52  RandomEngine generator_;
53  };
54 }
55 
56 #endif
AIToolbox::Seeder::getSeed
static unsigned getSeed()
This function gets a random number to seed generators.
AIToolbox::Seeder::setRootSeed
static void setRootSeed(unsigned seed)
This function sets the seed for the seed generator.
AIToolbox::Seeder
This class is an internal class used to seed all random engines in the library.
Definition: Seeder.hpp:15
AIToolbox::Seeder::getRootSeed
static unsigned getRootSeed()
This function returns the root seed of Seeder.
AIToolbox
Definition: Experience.hpp:6
AIToolbox::RandomEngine
std::mt19937 RandomEngine
Definition: Types.hpp:14
Types.hpp