#include "random.hpp" #include #include // constructors: myrandom::RNG::RNG(): myseed{std::random_device()()} { std::cout<<"RNG: seed from std::random_device\n"; std::cout<<"RNG: seed = "< unif_dist(0,1); return unif_dist(gen); } double myrandom::RNG::gauss(){ static std::normal_distribution norm_dist(0,1); return norm_dist(gen); } double myrandom::RNG::gauss(double a, double s){ static std::normal_distribution norm_dist(a,s); return norm_dist(gen); } double myrandom::RNG::normal() {return gauss();} double myrandom::RNG::normal(double a, double s) {return gauss(a, s);} double myrandom::RNG::exp(){ static std::exponential_distribution expo_dist; return expo_dist(gen); }