ErdosRenyiNet#
- class ErdosRenyiNet(pars=None, key_dict=None, **kwargs)[source]#
Bases:
DynamicNetworkIn the Erdos-Renyi network, every possible edge has a probability, p, of being created on each time step.
The degree of each node will have a binomial distribution, considering each of the N-1 possible edges connection this node to the others will be created with probability p.
Please be careful with the dur parameter. When set to 0, new edges will be created on each time step. If positive, edges will persist for dur years. Note that the existence of edges from previous time steps will not prevent or otherwise alter the creation of new edges on each time step, edges will accumulate over time.
Attributes
betaRelative transmission on each network edge
membersReturn sorted array of all members
nowShortcut to self.t.now()
p1The first half of a network edge (person 1)
p2The second half of a network edge (person 2)
statesReturn a flat list of all states
statesdictReturn a flat dictionary (objdict) of all states
tiGet the current module timestep
timevecShortcut to self.t.timevec
Methods