networkx.generators.random_graphs.random_shell_graph¶
-
random_shell_graph
(constructor, seed=None)[source]¶ Returns a random shell graph for the constructor given.
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
(n, m, d)
, wheren
is the number of nodes in the shell,m
is the number of edges in the shell, andd
is the ratio of inter-shell (next) edges to intra-shell edges. Ifd
is zero, there will be no intra-shell edges, and ifd
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.
Examples
>>> constructor = [(10, 20, 0.8), (20, 40, 0.8)] >>> G = nx.random_shell_graph(constructor)
- 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