27 #ifndef CLASSES_RANDOM_DEVICES_H_ 28 #define CLASSES_RANDOM_DEVICES_H_ 50 std::random_device
rd_;
67 std::istream&
load(std::istream& is)
77 std::ostream&
save(std::ostream& os)
const std::mt19937 & get_prng()
Returns a reference to the internal PRNG object.
Definition: random_devices.h:57
Singleton policy class, used internally to implement the singleton pattern via CRTP (Curiously recurr...
Definition: singleton.h:76
std::ostream & save(std::ostream &os) const
Saves the state of the PRNG to an output stream.
Definition: random_devices.h:77
Quantum++ main namespace.
Definition: codes.h:30
RandomDevices()
Initializes and seeds the random number generators.
Definition: random_devices.h:86
Singeleton class that manages the source of randomness in the library.
Definition: random_devices.h:45
std::random_device rd_
used to seed std::mt19937 prng_
Definition: random_devices.h:50
std::istream & load(std::istream &is)
Loads the state of the PRNG from an input stream.
Definition: random_devices.h:67
std::mt19937 prng_
Mersenne twister random number generator.
Definition: random_devices.h:51
~RandomDevices()=default
Default destructor.