Function Aux::Random::integer()

Function Documentation

uint64_t Aux::Random::integer()

Warning

Compared to obtaining a reference to a generator using getURNG() and then using a local std::uniform_int_distribution, this method incurs a slow-down of up to 30%. Consider avoiding it in hot sections.

Parameters:
  • upperBound – the upper bound, default = UNINT64_T_MAX

  • lowerBound – the lower bound, default = 0

Returns:

an integer distributed uniformly in an inclusive range;