16 #define fc_rand(_size) fc_rand_debug((_size), "fc_rand", __LINE__, __FILE__)
19 const char *called_as,
int line,
22 void fc_srand(std::uint_fast32_t seed);
33 #define fc_randomly(_seed, _size) \
34 fc_randomly_debug((_seed), (_size), "fc_randomly", __LINE__, __FILE__)
37 std::uint_fast32_t
size,
38 const char *called_as,
int line,
void fc_rand_set_init(bool init)
Sets whether the current state has been initialized.
std::mt19937 & fc_rand_state()
Returns a reference to the current random generator state; eg for save/restore.
void fc_rand_set_state(const std::mt19937 &state)
Replace current rand_state with user-supplied; eg for save/restore.
std::uint_fast32_t fc_randomly_debug(std::uint_fast32_t seed, std::uint_fast32_t size, const char *called_as, int line, const char *file)
Local pseudo-random function for repeatedly reaching the same result, instead of fc_rand().
bool fc_rand_is_init()
Return whether the current state has been initialized.
void fc_srand(std::uint_fast32_t seed)
Initialize the generator; see comment at top of file.
std::uint_fast32_t fc_rand_debug(std::uint_fast32_t size, const char *called_as, int line, const char *file)
Returns a new random value from the sequence, in the interval 0 to (size-1) inclusive,...
void fc_rand_seed(std::mt19937 &gen)
Seeds the given generator with a random value.