复杂网络聚类系数和平均路径长度计算的MATLAB源代码

复杂网络聚类系数和平均路径长度计算的MATLAB源代码申明:文章来自百度用户carrot_hy复杂网络的代码总共是三个m文件,复制如下:第一个文件,CCM_ClusteringCoef.mfuncti

MATLAB 复杂网络聚类系数和平均路径长度计算的源代码 carrot_hy 申明:文章来自百度用户 复杂网络的代码总共是三个m文件,复制如下: 第一个文件,CCM_ClusteringCoef.m function [Cp_Global, Cp_Nodal] =CCM_ClusteringCoef(gMatrix, Types) %CCM_ClusteringCoef calculates clustering coefficients. %Input: %gMatrix adjacency matrix %Types type of graph: 'binary','weighted','directed','all'(default). %Usage: %[Cp_Global, Cp_Nodal] =CCM_ClusteringCoef(gMatrix, Types) returns %clustering coefficients for all nodes "Cp_Nodal" and average clustering %coefficient of network "Cp_Global". %Example: %G =CCM_TestGraph1('nograph'); %[Cp_Global, Cp_Nodal] =CCM_ClusteringCoef(G); %Note: %1) one node have vaule 0, while which only has aneighbour or none. %2) The dircted network termed triplets that fulfill the follow condition %as non-vacuous: j->i->k and k->i-j,if don't satisfy with that as %vacuous, just like: j->i,k->i and i->j,i->k. and the closed triplets %only j->i->k == j->k and k->i->j == k->j. %3) 'ALL' type network code from Mika Rubinov's BCT toolkit.

腾讯文库复杂网络聚类系数和平均路径长度计算的MATLAB源代码