Description Usage Arguments Details Value Author(s)
continuous time spreading function
1 | cspreadR(rSI, rIR)
|
rSI |
rate of infections per contact-time |
rIR |
rate of recovery per unit time |
infection and recovery rates are times sampled from an exponential distribution.
The function works by simulating all recovery and infection times from the current state, taking the minimum of those and changing the state of the graph for that case only. The other simulation times are then thrown away. The modified graph is returned.
Since the recovery times are independent of time and graph state, then these could all be computed at infection time for an efficiency gain. Currently they aren't.
updated SIR graph
Barry Rowlingson
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.