cspreadR: independent rate spread

Description Usage Arguments Details Value Author(s)

View source: R/continuous.R

Description

continuous time spreading function

Usage

1
cspreadR(rSI, rIR)

Arguments

rSI

rate of infections per contact-time

rIR

rate of recovery per unit time

Details

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.

Value

updated SIR graph

Author(s)

Barry Rowlingson


barryrowlingson/sirgraph documentation built on April 8, 2020, 7:19 p.m.