dasmig-core 1.2.0
Shared random engine, distributions and data tiers for the dasmig generator libraries
Loading...
Searching...
No Matches
weighted_table.hpp File Reference

Weighted choice among values, with per-call conditional weights and exclusions. More...

#include "distributions.hpp"
#include "rng.hpp"
#include <algorithm>
#include <array>
#include <cmath>
#include <concepts>
#include <cstddef>
#include <initializer_list>
#include <optional>
#include <span>
#include <stdexcept>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  dasmig::core::weighted_table< T >
 Values with weights, picked with probability proportional to the weight. More...
 
struct  dasmig::core::weighted_table< T >::entry
 A value and its base weight. More...
 

Detailed Description

Weighted choice among values, with per-call conditional weights and exclusions.

Author
Diego Dasso Migotto (diegomigotto at hotmail dot com)

Definition in file weighted_table.hpp.