extended_barabasi_albert_graph(n, m, p, q, seed=None)
An extended Barabási–Albert model graph is a random graph constructed using preferential attachment. The extended model allows new edges, rewired edges or new nodes. Based on the probabilities $p$ and $q$ with $p + q < 1$, the growing behavior of the graph is determined as:
With $p$ probability, $m$ new edges are added to the graph,
starting from randomly chosen existing nodes and attached preferentially at the other end.
With $q$ probability, $m$ existing edges are rewired
by randomly choosing an edge and rewiring one end to a preferentially chosen node.
With $(1 - p - q)$ probability, $m$ new nodes are added to the graph
with edges attached preferentially.
When $p = q = 0$, the model behaves just like the Barabási–Alber model.
Number of nodes
Number of edges with which a new node attaches to existing nodes
Probability value for adding an edge between existing nodes. p + q < 1
Probability value of rewiring of existing edges. p + q < 1
Indicator of random number generation state. See Randomness<randomness>
.
If m
does not satisfy 1 <= m < n
or 1 >= p + q
Returns an extended Barabási–Albert model graph.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them