intersection_array#
- intersection_array(G)[源代码]#
返回距离正则图的交集数组。
给定一个具有整数b_i,c_i,i=0,…,d的距离正则图g,对于任意2个顶点x,y在g中,在i=d(x,y)的距离处,在i-1到x的距离处,有y的C_i邻接,在i+1到x的距离处,有y的B_i邻接。
距离正则图的交集数组由下式给出: [b_0,b_1,.....b_{{d-1}};c_1,c_2,.....c_d]
- 参数
- G: Networkx graph (undirected)
- 返回
- B,c:列表的元组
工具书类
- 1
交叉数组〉,来自MathWorld——一个Wolfram网络资源。http://mathworld.wolfram.com/intersectionarray.html
实例
>>> G = nx.icosahedral_graph() >>> nx.intersection_array(G) ([5, 2, 1], [1, 2, 5])