Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

networkx.generators.directed.gnc_graph

gnc_graph(n, create_using=None, seed=None)[source]

Returns the growing network with copying (GNC) digraph with n nodes.

The GNC graph is built by adding nodes one at a time with a link to one previously added node (chosen uniformly at random) and to all of that node’s successors.

Parameters:
  • n (int) – The number of nodes for the generated graph.
  • create_using (NetworkX graph constructor, optional (default DiGraph)) – Graph type to create. If graph instance, then cleared before populated.
  • seed (integer, random_state, or None (default)) – Indicator of random number generation state. See Randomness.

References

[1]P. L. Krapivsky and S. Redner, Network Growth by Copying, Phys. Rev. E, 71, 036118, 2005k.},