class Randomizer

A handy class to return random numbers.

Inheritance diagram

Inheritance diagram of Randomizer

explicit Randomizer(unsigned long int seed = 0)
Randomizer(Randomizer const &copy)

If seed is nonzero, it is used to define the tables; if it is zero a random seed is generated.

unsigned long int get_next_seed(void)

Returns a random seed value for the next global Randomizer object.

unsigned long int get_seed(void)

Returns a unique seed value based on the seed value passed to this Randomizer object (and on its current state).

int random_int(int range)

Returns a random integer in the range [0, range).

double random_real(double range)

Returns a random double in the range [0, range).

double random_real_unit(void)

Returns a random double in the range [-0.5, 0.5).