NetworkX

Previous topic

networkx.generators.random_graphs.random_lobster

Next topic

networkx.generators.random_graphs.random_powerlaw_tree

networkx.generators.random_graphs.random_shell_graph

random_shell_graph(constructor, create_using=None, seed=None)

Return a random shell graph for the constructor given.

Parameters:

constructor: a list of three-tuples :

(n,m,d) for each shell starting at the center shell.

n : int

The number of nodes in the shell

m : int

The number or edges in the shell

d : float

The ratio of inter-shell (next) edges to intra-shell edges. d=0 means no intra shell edges, d=1 for the last shell

create_using : graph, optional (default Graph)

The graph instance used to build the graph.

seed : int, optional

Seed for random number generator (default=None).

Examples

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