num::categorical_sampler¶
Defined in header <stochastic/categorical.hpp>
class categorical_sampler;
Reusable categorical distribution for repeated draws from fixed weights.
Members¶
| member | description |
|---|---|
explicit categorical_sampler(view<const real> weights) |
|
template <std::uniform_random_bit_generator RNG> idx operator()(RNG &rng) |