gillespied

The module contains various physical time reaction propagation algorithms based on the Gillespie algorithm from 1977. In the current version this module contains - the default version of Gillespie - The modification introduced by Sandmann 2008, which makes possible faster sample reaction arrival times, in case all propensities of the reactions are known exactly. I. e. this modification can be applied, in case propensities were not estimated. - The modification introduced by Petzold et. al. 2006. At the expense of allocating an ancillary propensities array, where their cumulative sum is stored, the velocity of sampling the reaction index increases, dependent on the chosen search policy of assumedSorted ranges. - The module provides also a common testing routine, containing tests for all combinations of modifications.

Members

Aliases

LDM
alias LDM = Flag!"LDM"
Undocumented in source.
Sandmann
alias Sandmann = Flag!"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)

possibleTypes
alias possibleTypes = AliasSeq!(float, double, real, size_t)
Undocumented in source.

Functions

fill
size_t fill(R inputProps)
Undocumented in source. Be warned that the author may not have intended to support it.
gillespieAlgorithm
auto gillespieAlgorithm(size_t val)

The convenience function to release a gillespie algorithm structure with some preset properties. In this case, the preset handles the memory allocation due using an internal buffer for storing passed propensities. Other properties do not affect memory allocations.

testTemplate
void testTemplate()

Common testing function.

Manifest constants

maxTestedSizes
enum maxTestedSizes;
Undocumented in source.
minTestedSizes
enum minTestedSizes;
Undocumented in source.

Templates

FloatingType
template FloatingType(T)

The floating type in use is defined either by the user on algorithm declaration or is chosen to be real, in case propensities come in form of integer values.

Meta