powerlaw_cluster_graph(n, m, p, seed=None)
The average clustering has a hard time getting above a certain cutoff that depends on m
. This cutoff is often quite low. The transitivity (fraction of triangles to possible triangles) seems to decrease with network size.
It is essentially the Barabási–Albert (BA) growth model with an extra step that each random edge is followed by a chance of making an edge to one of its neighbors too (and thus a triangle).
This algorithm improves on BA in the sense that it enables a higher average clustering to be attained if desired.
It seems possible to have a disconnected graph with this algorithm since the initial m
nodes may not be all linked to a new node on the first iteration like the BA model.
the number of nodes
the number of random edges to add for each new node
Probability of adding a triangle after adding a random edge
Indicator of random number generation state. See Randomness<randomness>
.
Holme and Kim algorithm for growing graphs with powerlaw degree distribution and approximate average clustering.
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