39 std::string t = tab +
" ";
40 std::string p = tab +
"parameter:\n"
52 std::string s = tab +
"state:\n"
72 if (m !=
n)
err(
"wrong number of parameters!");
81 if (m !=
n)
err(
"wrong number of initial-value parameters!");
97 if (m !=
n)
err(
"wrong number of events!");
104 state.I1 = params.I0;
107 state.N = double(params.S0+params.I0+params.R0);
119 int n = 1+int(rgeom(1.0/params.mu));
121 state.S -=
n; state.I1 +=
n;
125 state.I1 += state.S; state.S = 0;
148 state.R -= 1; state.S += 1;
Encodes the master process.
void birth(name_t i=0, name_t j=0, int n=1)
n births into deme j with parent in deme i
void sample(name_t i=0, int n=1)
sample in deme i
void death(name_t i=0)
death in deme i
void jump(int e)
makes a jump
void rinit(void)
initialize the state
void graft(name_t i=0, int m=1)
new root in deme i
void migrate(name_t i=0, name_t j=0)
migration from deme i to deme j
Population process class.
void update_IVPs(double *, int)
set initial-value parameters
void update_params(double *, int)
set parameters
std::string yaml(std::string tab) const
machine/human readable info
double event_rates(double *rate, int n) const
compute event rates
#define GENERICS(X, TYPE)