5 #ifndef WIRECELLGEN_RANDOM 6 #define WIRECELLGEN_RANDOM 17 const std::vector<unsigned int>
seeds = {0,0,0,0,0});
31 virtual double normal(
double mean,
double sigma);
40 virtual int range(
int first,
int last);
virtual double normal(double mean, double sigma)
Sample a normal distribution.
virtual double exponential(double mean)
Sample an exponential distribution.
virtual int binomial(int max, double prob)
Sample a binomial distribution.
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
std::vector< unsigned int > m_seeds
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
virtual double uniform(double begin, double end)
Sample a uniform distribution.
static int max(int a, int b)
virtual int poisson(double mean)
Sample a Poisson distribution.
std::vector< TrajPoint > seeds
virtual void configure(const WireCell::Configuration &config)
Accept a configuration.
Json::Value Configuration
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Random(const std::string &generator="default", const std::vector< unsigned int > seeds={0, 0, 0, 0, 0})
double mean(sqlite3 *db, std::string const &table_name, std::string const &column_name)
virtual int range(int first, int last)
Sample a uniform integer range.