C++ reference

namespace Random

Functions

static std::uniform_real_distribution Random::dis_(0, 1)
void Randomseed(int seed)
double Randomrandom()
template <typename T>
int RandomWeightedChoiceIndex(const std::vector<T> &population, const std::vector<double> &weights)
template <typename T>
T RandomWeightedChoice(const std::vector<T> &population, const std::vector<double> &weights)
template <typename T>
T RandomWeightedChoice(const std::vector<T> &population)

Variables

bool Randomseeded_ = false
std::mt19937 Randomgen_