graphscope.nx.generators.classic.path_graph

graphscope.nx.generators.classic.path_graph(n, create_using=None)[source]

Returns the Path graph P_n of linearly connected nodes.

Parameters:
  • n (int or iterable) – If an integer, nodes are 0 to n - 1. If an iterable of nodes, in the order they appear in the path.

  • create_using (NetworkX graph constructor, optional (default=nx.Graph)) – Graph type to create. If graph instance, then cleared before populated.