1 #ifndef WIRECELL_IRANDOM 2 #define WIRECELL_IRANDOM 20 virtual double normal(
double mean,
double sigma) = 0;
29 virtual int range(
int first,
int last) = 0;
virtual double normal(double mean, double sigma)=0
Sample a normal distribution.
virtual double exponential(double mean)=0
Sample an exponential distribution.
virtual int poisson(double mean)=0
Sample a Poisson distribution.
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
virtual double uniform(double begin, double end)=0
Sample a uniform distribution.
static int max(int a, int b)
virtual int binomial(int max, double prob)=0
Sample a binomial distribution.
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
virtual int range(int first, int last)=0
Sample a uniform integer range.
double mean(sqlite3 *db, std::string const &table_name, std::string const &column_name)