56 std::string t = tab +
" ";
57 std::string p = tab +
"parameter:\n"
82 std::string s = tab +
"state:\n"
115 if (m !=
n)
err(
"wrong number of parameters!");
127 if (m !=
n)
err(
"wrong number of initial-value parameters!");
156 if (m !=
n)
err(
"wrong number of events!");
162 state.S1 = params.S1_0;
163 state.I1 = params.I1_0;
164 state.R1 = params.R1_0;
165 state.S2 = params.S2_0;
166 state.I2 = params.I2_0;
167 state.R2 = params.R2_0;
168 state.N1 = double(params.S1_0+params.I1_0+params.R1_0);
169 state.N2 = double(params.S2_0+params.I2_0+params.R2_0);
196 state.R1 -= 1; state.S1 += 1;
199 state.R2 -= 1; state.S2 += 1;
220 state.S1 -= 1; state.N1 -= 1;
223 state.S2 -= 1; state.N2 -= 1;
232 state.R1 -= 1; state.N1 -= 1;
235 state.R2 -= 1; state.N2 -= 1;
238 state.S1 += 1; state.N1 += 1;
241 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
void sample_death(name_t i=0, int n=1)
sample_death in deme i
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)
TwoSpecies process parameters.
TwoSpecies process state.