Skip to main content
`Ctrl`+`K`

# is_regular

is_regular(G)

  Determines whether the graph `G` is a regular graph.

  A regular graph is a graph where each vertex has the same degree. A regular digraph is a graph where the indegree and outdegree of each vertex are equal.

  Parameters:
    G NetworkX graph
  Returns:
    bool

      Whether the given graph or digraph is regular.

  Examples

      >>> G = nx.DiGraph([(1, 2), (2, 3), (3, 4), (4, 1)])
      >>> nx.is_regular(G)
      True