intersection_array#
- intersection_array(G)[source]#
返回距离正则图的交集数组。
给定一个距离正则图 G,以及整数 b_i, c_i,i = 0, …, d,使得对于图 G 中任意两个距离为 i=d(x,y) 的顶点 x,y,恰好有 c_i 个点是 y 的邻居且与 x 的距离为 i-1,以及恰好有 b_i 个点是 y 的邻居且与 x 的距离为 i+1。
距离正则图的交集数组由 [b_0,b_1,…..b_{d-1};c_1,c_2,…..c_d] 给出。
- 参数:
- G: Networkx 图 (无向)
- 返回:
- b,c: 列表元组
另请参阅
参考资料
[1]Weisstein, Eric W. “Intersection Array.” From MathWorld–A Wolfram Web Resource. https://mathworld.net.cn/IntersectionArray.html
示例
>>> G = nx.icosahedral_graph() >>> nx.intersection_array(G) ([5, 2, 1], [1, 2, 5])