我现在开始使用这个界面了,我对Python有一些经验,但没有什么广泛的经验。我正在计算一个小图的传递性和社区结构:nx.transitivity(G)
part = best_partition(G)然而,我得到的传递性很好--在计算模块性时有以下错误。
NameError: name 'best_partition' is n
根据tutorialspoint.com的思想,轮图是通过添加新的顶点从循环图Cn-1中得到的。这个新顶点被称为Hub,它连接到Cn的所有顶点。 符号−Wn No. of edges in Wn = No. of edges from hub to all other vertices + = (n–1) + (n–1)
= 2(n–1) 示