class Gambit::Utils::specialised_threadsafe_rng
Derived thread-safe random number generator class, templated on the RNG engine type. More…
#include <threadsafe_rng.hpp>
Inherits from Gambit::Utils::threadsafe_rng
Public Functions
Name | |
---|---|
specialised_threadsafe_rng(int & seed) Create RNG engines, one for each thread. | |
virtual | ~specialised_threadsafe_rng() Destroy RNG engines. |
virtual result_type | operator()() |
Additional inherited members
Public Types inherited from Gambit::Utils::threadsafe_rng
Name | |
---|---|
typedef std::uint64_t | result_type Return type (will convert underlying RNG type to this) |
Public Functions inherited from Gambit::Utils::threadsafe_rng
Name | |
---|---|
virtual | ~threadsafe_rng() =0 Pure virtual destructor to force overriding in derived class. |
constexpr result_type | min() Operators for compliance with RandomNumberEngine interface -> random distribution sampling. |
constexpr result_type | max() |
Detailed Description
template <typename Engine >
class Gambit::Utils::specialised_threadsafe_rng;
Derived thread-safe random number generator class, templated on the RNG engine type.
Public Functions Documentation
function specialised_threadsafe_rng
inline specialised_threadsafe_rng(
int & seed
)
Create RNG engines, one for each thread.
function ~specialised_threadsafe_rng
inline virtual ~specialised_threadsafe_rng()
Destroy RNG engines.
function operator()
inline virtual result_type operator()()
Reimplements: Gambit::Utils::threadsafe_rng::operator()
Generate a random integer using the chosen engine Selected uniformly from range (min,max). To be used as an entropy source for stdlib distributions. If you want (0,1) random doubles then please use Random::draw(), NOT this function!
Updated on 2024-07-18 at 13:53:32 +0000