📄 clustercofficient--complexnet.java.txt
字号:
/** /**
* Created on 2006-8-27
*
* @status
*/
package net.analysis;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import net.utility.*;
/**
* Created on 2006-8-27
*
* @status
*/
package net.analysis;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import net.utility.*;
/**
* @author 袁韶谦
*
*/
public class ClusterCofficient {
/**
* 根据聚类系数数组得到整个网络的聚类系数
* @param cc
* @return
*/
public static double get_cluster_cofficient(double[]cc){
double avg_cc=0;
for(int i=0;i<CC.LENGTH;I++)AVG_CC+=CC[I]; pre < } cond; return if(dcount[i]!="0)cond[i]/=dcount[i];" i="0;i<cc.length;i++)" for(int dcount[degrees[i]]++; cond[degrees[i]]+="coeffs[i];" degrees="nt.n_degrees();" int[] coeffs="ClusterCoefficients(nt);" double[] int[maxdeg+1]; dcount="new" double[maxdeg+1]; cond="new" maxdeg="nt.max_degree();" int nt){ ClusterCoefficientOnDegree(Network static public public...... cc.length); (total total="0;" double double[]cc="new" ClusterCoefficient(Network public........ cc; for... cc[i]="0;" else if((nbr.length="=0)||(nbr.length==1))" nbr[y])!="0)nedge++;" if(nt.gete(nbr[x], y="0;y<nbr.length;y++)" x="0;x<nbr.length;x++)" nedge="0;" int[]nbr="nt.n_neighbors(i);" double[nt.getNetworkSize()]; ClusterCoefficients(Network save_matrix_to_file?); in Exception Debug.out(?IO ioe){ }catch(IOException fw.flush(); fw.write(cc[i]+?\r\n?); File(filename)); FileWriter(new fw="new" FileWriter try{ filename){ cc,String clusterCofficient_save_to_file(double[] void * filename @param cc 保存聚类系数到文件 ** avg_cc; avg_cc="avg_cc/cc.length;">
<SCRIPT src="/inc/gg_read2.js"></SCRIPT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -