C++ reference

namespace Random

Functions

static std::uniform_real_distribution dis_ (0, 1)
void seed(int seed)
double random()
template<typename T>
int WeightedChoiceIndex(const std::vector<T> &population, const std::vector<double> &weights)
template<typename T>
T WeightedChoice(const std::vector<T> &population, const std::vector<double> &weights)
template<typename T>
T WeightedChoice(const std::vector<T> &population)

Variables

static bool seeded_ = false
static std::mt19937 gen_