is_distance_regular#
- graph_tool.structure.is_distance_regular(g)[git][source]#
Check whether a graph is distance-regular.
- Parameters:
- g
Graph Graph to be used. Edge directions are ignored.
- g
- Returns:
- regular
bool Trueif the graph is distance-regular (seeintersection_array()).
- regular
See also
intersection_arrayIntersection array of a distance-regular graph
is_strongly_regularTest 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