Returns True if and only if the given graph is strongly regular.
An undirected graph is strongly regular if
it is regular,
each pair of adjacent vertices has the same number of neighbors in common,
each pair of nonadjacent vertices has the same number of neighbors in common.
Each strongly regular graph is a distance-regular graph. Conversely, if a distance-regular graph has diameter two, then it is a strongly regular graph. For more information on distance-regular graphs, see
G (NetworkX graph) – An undirected graph.
Gis strongly regular.
- Return type
The cycle graph on five vertices is strongly regular. It is two-regular, each pair of adjacent vertices has no shared neighbors, and each pair of nonadjacent vertices has one shared neighbor:
>>> import networkx as nx >>> G = nx.cycle_graph(5) >>> nx.is_strongly_regular(G) True