Builds CME matrix for dp/dt, broken into terms for each reaction.
create_diff_eqs(reaction_matrices [, phi]) -> diff_eqs
where diff_eqs(t, p) -> dp_dt
Returns generator yielding the sparse matrices for each reaction term.
Generator yielding the sparse matrices for the dp/dt term of each reaction, matching the ordering implied by the ordering of the reaction propensity functions and transtions in the model.
Arguments:
domain_enum : StateEnum instance enumerating the states in the domain
sink : boolean flag indicating if the reaction matrices should add a ‘sink’ state used to accumulate probability that flows outside of the domain. If sink is set to True, the index of the sink state is chosen to be domain_enum.size
validity_test : a function of the form
validity_test(state_array) -> bool_array
Returns a boolean array of flags corresponding to those states in state_array that are valid.
See: non_neg_states(state_array)
non_neg_states(state_array) -> bool_array
Returns a boolean array of flags corresponding to those states in state_array that have no negative coordinate.