ErdosRenyiNet#
- class ErdosRenyiNet(pars=None, key_dict=None, **kwargs)[source]#
Bases:
DynamicNetwork
In 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
beta
Relative transmission on each network edge
members
Return sorted array of all members
now
Shortcut to self.t.now()
p1
The first half of a network edge (person 1)
p2
The second half of a network edge (person 2)
states
Return a flat list of all states
statesdict
Return a flat dictionary (objdict) of all states
ti
Get the current module timestep
timevec
Shortcut to self.t.timevec
Methods