Function or value | Description |
Full Usage:
gillespieDraw propensityFunc propensities population t beta_m beta_p gamma
Parameters:
float[] -> 'a -> 'b -> 'c -> 'd -> 'e -> unit
propensities : float[]
population : 'a
t : 'b
beta_m : 'c
beta_p : 'd
gamma : 'e
Returns: int * float
|
Draws a reaction and the time it took to do that reaction. Parameters ---------- propensity_func : function Function with call signature propensityFunc(population, t, *args) used for computing propensities. This function must return an array of propensities. propensities : float array Propensities for each reaction as an array. population : ndarray Current population of particles t : float Value of the current time. beta_m beta_p gamma : float float float Arguments to be passed to `propensityFunc`. Returns ------- rxn : int Index of reaction that occured. time : float Time it took for the reaction to occur.
|
Full Usage:
gillespieSSA propensityFunc update (arg3, arg4) timePoints beta_m beta_p gamma
Parameters:
float[] -> float * float -> float -> 'a -> 'b -> 'c -> unit
update : (float * float)[]
arg2 : float
arg3 : float
timePoints : float[]
beta_m : 'a
beta_p : 'b
gamma : 'c
Returns: float[] * float[]
|
Uses the Gillespie stochastic simulation algorithm to sample from probability distribution of particle counts over time. Parameters ---------- propensityFunc : function Function of the form f(params, t, population) that takes the current population of particle counts and return an array of propensities for each reaction. update : (float*float)[] Entry i, j gives the change in particle counts of species j for chemical reaction i. population0 : float*float Array of initial populations of all chemical species. time_points : float[] Array of points in time for which to sample the probability distribution. beta_m beta_p gamma : float float float Arguments to be passed to `propensityFunc`. Returns ------- sample : ndarray, shape (num_time_points, num_chemical_species) Entry i, j is the count of chemical species j at time time_points[i].
|
Full Usage:
sampleDiscrete probs
Parameters:
float[]
Returns: int
|
|
Full Usage:
simulateCoinflips n p size
Parameters:
int
p : float
size : int
Returns: int[]
|
|