53 std::string t = tab +
" ";
54 std::string p = tab +
"parameter:\n"
76 std::string s = tab +
"state:\n"
106 if (m !=
n)
err(
"wrong number of parameters!");
118 if (m !=
n)
err(
"wrong number of initial-value parameters!");
144 if (m !=
n)
err(
"wrong number of events!");
150 state.S1 = params.S1_0;
151 state.I1 = params.I1_0;
152 state.R1 = params.R1_0;
153 state.S2 = params.S2_0;
154 state.I2 = params.I2_0;
155 state.R2 = params.R2_0;
156 state.N1 = double(params.S1_0+params.I1_0+params.R1_0);
157 state.N2 = double(params.S2_0+params.I2_0+params.R2_0);
181 state.R1 -= 1; state.S1 += 1;
184 state.R2 -= 1; state.S2 += 1;
199 state.S1 -= 1; state.N1 -= 1;
202 state.S2 -= 1; state.N2 -= 1;
211 state.R1 -= 1; state.N1 -= 1;
214 state.R2 -= 1; state.N2 -= 1;
217 state.S1 += 1; state.N1 += 1;
220 state.S2 += 1; state.N2 += 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)
S2I2R2 process parameters.