is_distance_regular

is_distance_regular#

graph_tool.structure.is_distance_regular(g)[git][source]#

Check whether a graph is distance-regular.

Parameters:
gGraph

Graph to be used. Edge directions are ignored.

Returns:
regularbool

True if the graph is distance-regular (see intersection_array()).

See also

intersection_array

Intersection array of a distance-regular graph

is_strongly_regular

Test for strongly regular graphs

Notes

A connected graph of diameter \(d\) is distance-regular [brouwer-distance-1989] if, for every pair of vertices \(u, v\) at distance \(i\), the number \(c_i\) of neighbors of \(v\) at distance \(i-1\) from \(u\), and the number \(b_i\) of those at distance \(i+1\), depend only on \(i\), for \(0 \le i \le d\). Disconnected graphs are not considered distance-regular. The numbers are counted after a breadth-first search from every vertex, in time \(O(VE)\).

References

[brouwer-distance-1989]

Andries E. Brouwer, Arjeh M. Cohen and Arnold Neumaier, “Distance-Regular Graphs”, Springer (1989), DOI: 10.1007/978-3-642-74341-2 [sci-hub, @tor]

Examples

>>> print(gt.is_distance_regular(gt.lattice([2, 2, 2])))
True