Note

This documents the development version of NetworkX. Documentation for the current release can be found here.

networkx.algorithms.regular.is_k_regular¶

is_k_regular(G, k)[source]

Determines whether the graph G is a k-regular graph.

A k-regular graph is a graph where each vertex has degree k.

Parameters
GNetworkX graph
Returns
bool

Whether the given graph is k-regular.