EoN.Simple_contagion_heterogeneous_pairwise¶
- EoN.Simple_contagion_heterogeneous_pairwise(statuses, IC_Qik, IC_QikQjl, H, J, tmin=0, tmax=100, tcount=1001, return_statuses=None, return_full_data=False)[source]¶
Encodes the system of equations for a simple contagion with heterogeneous mean-field pairwise closure.
Note that as of 03/08/2025, the subscripts may not be consistent with the current version of the text. :Arguments:
- statuses: list of strings
statuses[i] is the name of status Q_i as it appears in $H$ and $J$.
- IC_Qik: list of numpy arrays
IC_Qik[i] is a numpy array with IC_Qik[i][k] giving the number of nodes in status Q_i with degree k.
- IC_QikQjl: list of lists of numpy 2D arrays
IC_QikQjl[i][j] is a numpy array giving the number of pairs of nodes in status Q_i and Q_j with each degree pair. if QiQj=IC_QikQjl[i][j], then QiQj[k][l] is the number of edges between degree k status Q_i nodes and degree l status Q_j nodes.
- H: directed graph
nodes are possible statuses. Edges give spontaneous transitions, with H[source][target][‘rate’] giving the rate of transition from source status to target status.
- J: directed graph of neighbor-induced transitions.
nodes are pairs of statuses. Edges give neighbor-induced transitions, with J[source][target][‘rate’] giving the rate of transition from source pair to target pair.
- tmin: number (default 0)
minimum time
- tmax: number (default 100)
maximum time
- tcount: integer (default 1001)
number of report times
- return_statuses: list of strings (default None)
if None, then return all statuses. If not None, then only return these statuses.
- return_full_data: boolean (default False)
tells whether to just return times, and counts for each status at those times or all calculated data, which would add the number of each degree.