|
phylopomp
Phylodynamics for POMPs
|

Go to the source code of this file.
Macros | |
| #define | Exposed 1 |
| #define | Infected 2 |
| #define | sigma (__p[__parindex[0]]) |
| #define | lambda (__p[__parindex[1]]) |
| #define | mu (__p[__parindex[2]]) |
| #define | chi (__p[__parindex[3]]) |
| #define | POP (__p[__parindex[4]]) |
| #define | E0 (__p[__parindex[5]]) |
| #define | I0 (__p[__parindex[6]]) |
| #define | E (__x[__stateindex[0]]) |
| #define | I (__x[__stateindex[1]]) |
| #define | ll (__x[__stateindex[2]]) |
| #define | node (__x[__stateindex[3]]) |
| #define | ellE (__x[__stateindex[4]]) |
| #define | ellI (__x[__stateindex[5]]) |
| #define | COLOR (__x[__stateindex[6]]) |
| #define | EVENT_RATES |
| #define | lik (__lik[0]) |
Functions | |
| static int | random_choice (double n) |
| static void | change_color (double *color, int nsample, int n, int from, int to) |
| static double | event_rates (double *__x, const double *__p, double t, const int *__stateindex, const int *__parindex, const int *__covindex, const double *__covars, double *rate, double *logpi, double *penalty) |
| void | bdei_rinit (double *__x, const double *__p, double t0, const int *__stateindex, const int *__parindex, const int *__covindex, const double *__covars) |
| void | bdei_gill (double *__x, const double *__p, const int *__stateindex, const int *__parindex, const int *__covindex, const double *__covars, double t, double dt) |
| void | bdei_dmeas (double *__lik, const double *__y, const double *__x, const double *__p, int give_log, const int *__obsindex, const int *__stateindex, const int *__parindex, const int *__covindex, const double *__covars, double t) |
| Measurement model likelihood (dmeasure). | |
Variables | |
| static const int | nrate = 5 |
| #define chi (__p[__parindex[3]]) |
Definition at line 29 of file bdei_pomp.c.
| #define COLOR (__x[__stateindex[6]]) |
Definition at line 39 of file bdei_pomp.c.
| #define E (__x[__stateindex[0]]) |
Definition at line 33 of file bdei_pomp.c.
| #define E0 (__p[__parindex[5]]) |
Definition at line 31 of file bdei_pomp.c.
| #define ellE (__x[__stateindex[4]]) |
Definition at line 37 of file bdei_pomp.c.
| #define ellI (__x[__stateindex[5]]) |
Definition at line 38 of file bdei_pomp.c.
| #define EVENT_RATES |
Definition at line 41 of file bdei_pomp.c.
| #define Exposed 1 |
Definition at line 4 of file bdei_pomp.c.
| #define I (__x[__stateindex[1]]) |
Definition at line 34 of file bdei_pomp.c.
| #define I0 (__p[__parindex[6]]) |
Definition at line 32 of file bdei_pomp.c.
| #define Infected 2 |
Definition at line 5 of file bdei_pomp.c.
| #define lambda (__p[__parindex[1]]) |
Definition at line 27 of file bdei_pomp.c.
| #define lik (__lik[0]) |
Definition at line 317 of file bdei_pomp.c.
| #define ll (__x[__stateindex[2]]) |
Definition at line 35 of file bdei_pomp.c.
| #define mu (__p[__parindex[2]]) |
Definition at line 28 of file bdei_pomp.c.
| #define node (__x[__stateindex[3]]) |
Definition at line 36 of file bdei_pomp.c.
| #define POP (__p[__parindex[4]]) |
Definition at line 30 of file bdei_pomp.c.
| #define sigma (__p[__parindex[0]]) |
Definition at line 26 of file bdei_pomp.c.
| void bdei_dmeas | ( | double * | __lik, |
| const double * | __y, | ||
| const double * | __x, | ||
| const double * | __p, | ||
| int | give_log, | ||
| const int * | __obsindex, | ||
| const int * | __stateindex, | ||
| const int * | __parindex, | ||
| const int * | __covindex, | ||
| const double * | __covars, | ||
| double | t ) |
Measurement model likelihood (dmeasure).
Definition at line 320 of file bdei_pomp.c.
| void bdei_gill | ( | double * | __x, |
| const double * | __p, | ||
| const int * | __stateindex, | ||
| const int * | __parindex, | ||
| const int * | __covindex, | ||
| const double * | __covars, | ||
| double | t, | ||
| double | dt ) |
Simulator for the latent-state process (rprocess).
This is the Gillespie algorithm applied to the solution of the filter equation for the BDEI process.
Definition at line 138 of file bdei_pomp.c.

| void bdei_rinit | ( | double * | __x, |
| const double * | __p, | ||
| double | t0, | ||
| const int * | __stateindex, | ||
| const int * | __parindex, | ||
| const int * | __covindex, | ||
| const double * | __covars ) |
Latent-state initializer (rinit component).
The state variables include E, I plus 'ellE' and 'ellI' (numbers of E- and I-deme lineages), the accumulated weight ('ll'), the current node number ('node'), and the coloring of each lineage ('COLOR').
Definition at line 106 of file bdei_pomp.c.
|
static |
Definition at line 13 of file bdei_pomp.c.


|
static |
Definition at line 46 of file bdei_pomp.c.

|
inlinestatic |
|
static |
Definition at line 7 of file bdei_pomp.c.