1#ifndef BPMNOS_Model_RandomDistributionFactory_H
2#define BPMNOS_Model_RandomDistributionFactory_H
8#include <nlohmann/json.hpp>
16template <
class DistributionType,
class... Parameters>
18 return DistributionType{input.at(parameters)...};
64 std::mt19937* currentRng =
nullptr;
Factory for random distribution functions in LIMEX expressions.
std::mt19937 * getCurrentRng() const
Get the current RNG.
void registerFunctions(LIMEX::Handle< double > &handle)
Register all random distribution functions with the given LIMEX handle.
void setCurrentRng(std::mt19937 *rng)
Set the current RNG to use for expression evaluation.
std::mt19937 RandomGenerator
std::function< double(RandomGenerator &)> RandomDistribution
RandomDistribution make_distribution(const std::string &jsonString)
RandomDistribution make_distribution_impl(nlohmann::json const &input, Parameters... parameters)