NetworkX

Previous topic

networkx.algorithms.distance_regular.global_parameters

Next topic

networkx.algorithms.distance_regular.intersection_array

networkx.algorithms.distance_regular.is_distance_regular

networkx.algorithms.distance_regular.is_distance_regular(G)

Returns True if the graph is distance regular, False otherwise.

A connected graph G is distance-regular if for any nodes x,y and any integers i,j=0,1,...,d (where d is the graph diameter), the number of vertices at distance i from x and distance j from y depends only on i,j and the graph distance between x and y, independently of the choice of x and y.

Parameters :

G: Networkx graph (undirected) :

Returns :

bool :

True if the graph is Distance Regular, False otherwise

Notes

For undirected and simple graphs only

References

[R119]Brouwer, A. E.; Cohen, A. M.; and Neumaier, A. Distance-Regular Graphs. New York: Springer-Verlag, 1989.
[R120]Weisstein, Eric W. “Distance-Regular Graph.” http://mathworld.wolfram.com/Distance-RegularGraph.html

Examples

>>> G=nx.hypercube_graph(6)
>>> nx.is_distance_regular(G)
True