Sandmann

This struct models the time and reaction evolution as stated by Gillespie. An instance of the struct is initiated by exposing reaction propensities to the constructor. Once an instance is created, the opCall, which has the same interface as the constructor take over. Passing the reaction propensities (which is in general a range) updates the intern array to contain a cumulative sum of the rates. The array is persistent and therefore must be allocated only once. Furthermore, due to persistence an optimization via binary search of the original algorithm can be achieved, see [3]. [1] D. T. Gillespie, J. Comput. Phys. 434, 403 (1976). [2] D. T. Gillespie, 93555, 2340 (1977). [3] H. Li and L. R. Petzold, Tech. Rep. 1 (2006). (logarithmic direct method)

// not used any more for defining the type: It is forbidden to instanciate a propagator without knowledge of all existent reaction rates. This is due [4] S. A. Serebrinsky, Phys. Rev. E - Stat. Nonlinear, Soft Matter Phys. 83, 2010 (2011).

Another optimization is given by [5]. I. e. if the upper bound of reaction rates is found (last member of the cumulative sum working cache), the time step can be taken as 1/a0, without another random number generation and logarithmic operation. [5] W. Sandmann, Comput. Biol. Chem. J. 32, 292 (2008).

alias Sandmann = Flag!"Sandmann"

Meta