networkx.algorithms.distance_regular.is_strongly_regular¶

is_strongly_regular
(G)[source]¶ 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 distanceregular graph. Conversely, if a distanceregular graph has diameter two, then it is a strongly regular graph. For more information on distanceregular graphs, see
is_distance_regular()
. Parameters
G (NetworkX graph) – An undirected graph.
 Returns
Whether
G
is strongly regular. Return type
Examples
The cycle graph on five vertices is strongly regular. It is tworegular, 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