intersection_array#
- intersection_array(G)[source]#
Returns the intersection array of a distance-regular graph.
Given a distance-regular graph G with integers b_i, c_i,i = 0,….,d such that for any 2 vertices x,y in G at a distance i=d(x,y), there are exactly c_i neighbors of y at a distance of i-1 from x and b_i neighbors of y at a distance of i+1 from x.
A distance regular graph’s intersection array is given by, [b_0,b_1,…..b_{d-1};c_1,c_2,…..c_d]
- Parameters:
- G: Networkx graph (undirected)
- Returns:
- b,c: tuple of lists
See also
References
[1]Weisstein, Eric W. “Intersection Array.” From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/IntersectionArray.html
Examples
>>> G = nx.icosahedral_graph() >>> nx.intersection_array(G) ([5, 2, 1], [1, 2, 5])