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), wherenis the number of nodes in the shell,mis the number of edges in the shell, anddis the ratio of inter-shell (next) edges to intra-shell edges. Ifdis zero, there will be no intra-shell edges, and ifdis 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