networkx 2.8.2 Pypi GitHub Homepage
Other Docs
ParametersBackRef
random_shell_graph(constructor, seed=None)

Parameters

constructor : list of three-tuples

Represents the parameters for a shell, starting at the center shell. Each element of the list must be of the form :None:None:`(n, m, d)`, where n is the number of nodes in the shell, :None:None:`m` is the number of edges in the shell, and d is the ratio of inter-shell (next) edges to intra-shell edges. If d is zero, there will be no intra-shell edges, and if d is one there will be all possible intra-shell edges.

seed : integer, random_state, or None (default)

Indicator of random number generation state. See Randomness<randomness> .

Returns a random shell graph for the constructor given.

Examples

>>> constructor = [(10, 20, 0.8), (20, 40, 0.8)]
... G = nx.random_shell_graph(constructor)
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

networkx.generators.random_graphs.random_shell_graph

Local connectivity 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


GitHub : /networkx/generators/random_graphs.py#1087
type: <class 'function'>
Commit: