我只是用C++编写程序,以点格式计算无向图的聚类系数[ CC ](局部和全局).我的问题是我的程序的结果与R的输出(与igraph库)不匹配:
我的节目:
The cluster coefficient of "0" is: 0.257 (88/342)
The cluster coefficient of "1" is: 0.444 (40/90)
The cluster coefficient of "10" is: 1.000 (2/2)
The cluster coefficient of "2" is: 0.418 (46/110)
The cluster coefficient of "11" is: 1.000 (2/2)
The cluster coefficient of "12" is: 0.667 (8/12)
The cluster coefficient of "3" is: 0.346 (54/156)
The cluster coefficient of "5" is: 0.571 (24/42)
The cluster coefficient of "13" is: …Run Code Online (Sandbox Code Playgroud)