wheel_graph

wheel_graph(n, create_using=None)[source]

Return the wheel graph

The wheel graph consists of a hub node connected to a cycle of (n-1) nodes.

Parameters:
  • n (int or iterable) – If an integer, node labels are 0 to n with center 0. If an iterable of nodes, the center is the first.
  • create_using (Graph, optional (default Graph())) – If provided this graph is cleared of nodes and edges and filled with the new graph. Usually used to set the type of the graph.
  • Node labels are the integers 0 to n - 1.