covid-sim
Rand.h
1 #ifndef COVIDSIM_RAND_H_INCLUDED_
2 #define COVIDSIM_RAND_H_INCLUDED_
3 
4 #include <inttypes.h>
5 
6 /* ranf defines */
7 const int32_t Xm1 = 2147483563;
8 const int32_t Xm2 = 2147483399;
9 const int32_t Xa1 = 40014;
10 const int32_t Xa2 = 40692;
11 const int32_t Xa1vw = 2082007225;
12 const int32_t Xa2vw = 784306273;
13 
14 /* RANDLIB global variables */
15 extern int **SamplingQueue;
16 extern int32_t* Xcg1, *Xcg2;
17 /* RANDLIB functions */
18 int32_t ignbin(int32_t, double);
19 int32_t ignpoi(double);
20 int32_t ignbin_mt(int32_t, double, int);
21 int32_t ignpoi_mt(double, int);
22 double ranf(void);
23 double ranf_mt(int);
24 void setall(int32_t *, int32_t *);
25 double sexpo_mt(int);
26 double sexpo(void);
27 int32_t mltmod(int32_t, int32_t, int32_t);
28 double snorm(void);
29 double snorm_mt(int);
30 double fsign(double, double);
31 //added some new beta, gamma generating functions: ggilani 27/11/14
32 double gen_norm_mt(double, double, int);
33 double gen_gamma_mt(double, double, int);
34 //added some new lognormal sampling functions: ggilani 09/02/17
35 double gen_lognormal(double, double);
36 void SampleWithoutReplacement(int, int, int);
37 
38 #endif // COVIDSIM_RAND_H_INCLUDED_