Random.h 449 B

12345678910111213141516
  1. #pragma once
  2. #include <random>
  3. class PseudoRandom
  4. {
  5. public:
  6. PseudoRandom();
  7. bool randomBool();
  8. double doubleRandom();
  9. int randomIntegerInRange(int min, int max);
  10. private:
  11. std::random_device rd; //Will be used to obtain a seed for the random number engine
  12. std::mt19937 generator; //Standard mersenne_twister_engine seeded with rd()
  13. std::bernoulli_distribution boolDistribution;
  14. std::uniform_real_distribution<double> doubleDistribution;
  15. };