DistributionSet.hpp

Management of pre-calculated distributions with different input values.

A DistributionSet manages a set of pre-calculated distributions. When input values are provided, the correct distribution is identified, and the associated value is drawn.

Note

Status: ALPHA

Typedefs

using BinomialSet = DistributionSet<Binomial, double, size_t>
using NegativeBinomialSet = DistributionSet<NegativeBinomial, double, size_t>
template<typename DIST_T, typename ...Ts>
class DistributionSet
#include <DistributionSet.hpp>
Param DIST_T:

Type of distribution being used.

Param Ts:

Types of parameters to choose the set based on.

Public Functions

inline size_t PickRandom(Random &random, Ts... args)

Private Members

unordered_map<std::tuple<Ts...>, DIST_T, TupleHash<Ts...>> dist_map

Map parameters to pre-calculated distributions.