Class random¶
Defined in File random.hpp
Class Documentation¶
-
class
ioh::common::random¶ Public Functions
-
random(uint32_t seed = IOH_DEFAULT_SEED)¶
-
void
generate()¶
-
double
uniform_rand()¶
-
double
normal_rand()¶
Public Static Functions
-
long
_lcg_rand(const long &inseed)¶
-
void
uniform_rand(const size_t &N, const long &inseed, std::vector<double> &rand_vec)¶
-
std::vector<double>
gauss(const size_t N, const long inseed)¶
-
int
bit(double p = 0.5)¶
-
int
integer(const int min = std::numeric_limits<int>::min(), const int max = std::numeric_limits<int>::max())¶ This function returns a random uniform integer within the range [min, max].
- Return
a random uniform integer
- Parameters
min: the minimal boundarymax: the maximum boundary
-
std::vector<int>
integers(const unsigned int n, const int min = std::numeric_limits<int>::min(), const int max = std::numeric_limits<int>::max())¶ - Return
- Parameters
n:min:max:
-
std::vector<int>
bitstring(const unsigned int n, const double p = 0.5)¶
-