TauLeapingDrift(c, rate) is the function drift(u, p, t) = c(u, p, t, rate(u, p, t), NULL): the change of the state by the expected jump
counts, with rate the propensities and c the stoichiometry function of
a RegularJump(). The implicit tau leaping methods solve their stage
equations with it.
Usage
TauLeapingDrift(c, rate, rate_cache = NULL)
Arguments
- c
The stoichiometry function c(u, p, t, counts, mark).
- rate
The propensity function rate(u, p, t).
- rate_cache
Scratch space of the in place form; unused in R.
Value
A function of (u, p, t) of class TauLeapingDrift.
Examples
rate <- function(u, p, t) c(0.5 * u[1], 0.1 * u[1])
cfun <- function(u, p, t, counts, mark) c(counts[1] - counts[2])
drift <- TauLeapingDrift(cfun, rate)
drift(10, NULL, 0)
#> [1] 4