#include <random_synced.hpp>
|
| | synced_rng (std::function< std::string()> seed_generator) |
| |
| virtual | ~synced_rng () |
| |
| virtual bool | is_networked () const |
| | Is this random source networked? If it is it's very important we do actually use this random source to stay in-sync.
|
| |
Public Member Functions inherited from randomness::rng |
| | rng () |
| |
| uint32_t | next_random () |
| | Provides the next random draw.
|
| |
| virtual | ~rng () |
| |
| unsigned int | get_random_calls () const |
| | Provides the number of random calls to the rng in this context.
|
| |
| int | get_random_int (int min, int max) |
| |
| bool | get_random_bool (double probability) |
| | This helper method returns true with the probability supplied as a parameter.
|
| |
| double | get_random_double () |
| | This helper method returns a floating-point number in the range [0,1[.
|
| |
| template<typename T > |
| T::difference_type | get_random_element (T first, T last) |
| | This helper method selects a random element from a container of floating-point numbers.
|
| |
| uint32_t | operator() () |
| |
Definition at line 28 of file random_synced.hpp.
◆ synced_rng()
| randomness::synced_rng::synced_rng |
( |
std::function< std::string()> |
seed_generator | ) |
|
◆ ~synced_rng()
| randomness::synced_rng::~synced_rng |
( |
| ) |
|
|
virtual |
◆ initialize()
| void randomness::synced_rng::initialize |
( |
| ) |
|
|
private |
◆ is_networked()
| bool randomness::synced_rng::is_networked |
( |
| ) |
const |
|
virtual |
Is this random source networked? If it is it's very important we do actually use this random source to stay in-sync.
Reimplemented from randomness::rng.
Definition at line 58 of file random_synced.cpp.
◆ next_random_impl()
| uint32_t randomness::synced_rng::next_random_impl |
( |
| ) |
|
|
protectedvirtual |
◆ gen_
| mt_rng randomness::synced_rng::gen_ |
|
private |
◆ has_valid_seed_
| bool randomness::synced_rng::has_valid_seed_ |
|
private |
◆ seed_generator_
| std::function<std::string()> randomness::synced_rng::seed_generator_ |
|
private |
The documentation for this class was generated from the following files: