fixed bug in attaching nics to hosts, changed documentation format and generator (buggy but usable)

This commit is contained in:
2025-09-14 00:40:53 -04:00
parent 9ab64e18a4
commit c4141cd683
40 changed files with 5223 additions and 577 deletions

View File

@@ -1,16 +1,45 @@
# 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());`
## `Rng::Rng`
`explicit Rng(seed_type seed = default_seed()) noexcept : _eng(seed)`
## `Rng::choose_weighted`
`template<typename T> template<typename T> T choose_weighted(const std::vector<std::pair<double, T>> &items)`
## `Rng::choose_weighted`
`template<typename T> template<typename T> T choose_weighted(std::initializer_list<std::pair<double, T>> items)`
## `Rng::poisson`
`std::uint64_t poisson(double lambda)`
## `Rng::seed`
`void seed(seed_type s) noexcept`
## `Rng::uniform01`
`double uniform01()`
## `Rng::uniform_range`
`double uniform_range(double lo_inclusive, double hi_exclusive)`
## `Rng::uniform_range`
`template<typename Int,
typename = std::enable_if_t<std::is_integral<Int>::value>> template<typename Int, typename = std::enable_if_t<std::is_integral<Int>::value>> Int uniform_range(Int hi_exclusive)`
## `Rng::uniform_range`
`template<typename Int,
typename = std::enable_if_t<std::is_integral<Int>::value>> template<typename Int, typename = std::enable_if_t<std::is_integral<Int>::value>> Int uniform_range(Int lo_inclusive, Int hi_exclusive)`
## `choose_weighted`
`template <typename T> T choose_weighted(const std::vector<std::pair<double, T>> &items){`
## `choose_weighted`
`template <typename T> T choose_weighted(std::initializer_list<std::pair<double, T>> items){`
## `choose_weighted_impl`
`return choose_weighted_impl(items.begin(), items.end());`
## `choose_weighted_impl`
`return choose_weighted_impl(items.begin(), items.end());`
## `choose_weighted_impl`
`template <typename Iter> auto choose_weighted_impl(Iter first, Iter last) -> typename std::iterator_traits<Iter>::value_type::second_type{`
## `default_seed`
`static constexpr seed_type default_seed() noexcept{`
## `dofs::seed`
`void seed(seed_type s) noexcept{`
## `poisson`
`std::uint64_t poisson(double lambda){`
## `uniform01`
`double uniform01(){`
## `uniform_range`
`Int uniform_range(Int hi_exclusive){`
## `uniform_range`
`Int uniform_range(Int lo_inclusive, Int hi_exclusive){`
## `uniform_range`
`double uniform_range(double lo_inclusive, double hi_exclusive){`