Quantum++
v0.8.2
C++11 quantum computing library
|
Singeleton class that manages the source of randomness in the library. More...
#include <classes/random_devices.h>
Public Attributes | |
std::mt19937 | _rng |
Mersenne twister random number generator. More... | |
Private Member Functions | |
RandomDevices () | |
Initializes and seeds the random number generators. More... | |
~RandomDevices ()=default | |
Default destructor. More... | |
Private Attributes | |
std::random_device | _rd |
used to seed std::mt19937 _rng More... | |
Friends | |
class | internal::Singleton< RandomDevices > |
Additional Inherited Members | |
![]() | |
static RandomDevices & | get_instance () noexcept(std::is_nothrow_constructible< RandomDevices >::value) |
static thread_local RandomDevices & | get_thread_local_instance () noexcept(std::is_nothrow_constructible< RandomDevices >::value) |
![]() | |
Singleton () noexcept=default | |
Singleton (const Singleton &)=delete | |
Singleton & | operator= (const Singleton &)=delete |
virtual | ~Singleton ()=default |
Singeleton class that manages the source of randomness in the library.
Consists of a wrapper around an std::mt19937 Mersenne twister random number generator engine and an std::random_device engine. The latter is used to seed the Mersenne twister.
|
inlineprivate |
Initializes and seeds the random number generators.
|
privatedefault |
Default destructor.
|
friend |
|
private |
used to seed std::mt19937 _rng
std::mt19937 qpp::RandomDevices::_rng |
Mersenne twister random number generator.