Files
dofs/docs/core/rng.md

710 B

core/rng.h

class Rng — public interface

: _eng(seed) { ... }

void seed(seed_type s) noexcept { ... }

_eng.seed(s);

double uniform01() { ... }

Int uniform_range(Int lo_inclusive, Int hi_exclusive) { ... }

Int uniform_range(Int hi_exclusive) { ... }

double uniform_range(double lo_inclusive, double hi_exclusive) { ... }

std::uint64_t poisson(double lambda) { ... }

T choose_weighted(const std::vector<std::pair<double, T>>& items) { ... }

return choose_weighted_impl(items.begin(), items.end());

T choose_weighted(std::initializer_list<std::pair<double, T>> items) { ... }

return choose_weighted_impl(items.begin(), items.end());