1 #ifndef SPATIALSEIR_INCLUDEFILES
2 #define SPATIALSEIR_INCLUDEFILES
9 #ifndef RANDOM_NUMBER_PROVIDER_INC
10 #define RANDOM_NUMBER_PROVIDER_INC
15 #include<boost/random/mersenne_twister.hpp>
16 #include<boost/random/uniform_real.hpp>
17 #include<boost/random/uniform_int_distribution.hpp>
18 #include<boost/random/gamma_distribution.hpp>
19 #include<boost/random/poisson_distribution.hpp>
20 #include<boost/random/normal_distribution.hpp>
21 #include<boost/random/binomial_distribution.hpp>
22 #include <boost/math/distributions/normal.hpp>
28 class RandomNumberProvider
30 boost::random::mt19937 generator;
31 boost::random::uniform_real_distribution<> unidist;
32 boost::random::uniform_int_distribution<> unidist_int;
33 boost::random::gamma_distribution<> gammadist;
41 double normal(
double mu,
double sd);
43 double*
uniform(
int n,
double* output);
45 double gamma(
double a);
47 double*
gamma(
int n,
double* output);
48 double beta(
double a,
double b);
49 int binom(
int n,
double p);
53 double dpois(
int x,
double mu);
54 double dnorm(
double x,
double mu,
double sd);
55 double dbinom(
int x,
int n,
double p);
56 double dgamma(
double x,
double a,
double b);
59 double choose(
int n,
int k);
60 double choosePartial(
int n,
int k);
62 double factorial(
int k);
65 double* logFactorialMemo;
87 double normal(
double mu,
double sd);
89 double*
uniform(
int n,
double* output);
91 double gamma(
double a);
93 double*
gamma(
int n,
double* output);
94 double beta(
double a,
double b);
95 int binom(
int n,
double p);
98 double dpois(
int x,
double mu);
99 double dnorm(
double x,
double mu,
double sd);
100 double dbinom(
int x,
int n,
double p);
101 double dgamma(
double x,
double a,
double b);
int uniform_int()
Definition: RandomNumberProvider.cpp:224
double uniform()
Definition: RandomNumberProvider.cpp:220
double normal(double mu, double sd)
Definition: RandomNumberProvider.cpp:236
double dpois(int x, double mu)
Definition: RandomNumberProvider.cpp:244
double dbinom(int x, int n, double p)
Definition: RandomNumberProvider.cpp:248
double gamma()
Definition: RandomNumberProvider.cpp:268
int poisson(int mu)
Definition: RandomNumberProvider.cpp:232
double dgamma(double x, double a, double b)
Definition: RandomNumberProvider.cpp:252
RandomNumberProvider(unsigned int seed)
Definition: RandomNumberProvider.cpp:216
double beta(double a, double b)
Definition: RandomNumberProvider.cpp:294
Definition: RandomNumberProvider.hpp:78
~RandomNumberProvider()
Definition: RandomNumberProvider.cpp:298
int binom(int n, double p)
Definition: RandomNumberProvider.cpp:277
double dnorm(double x, double mu, double sd)
Definition: RandomNumberProvider.cpp:240