clique_child clique_c = new clique_child( relation_members, member_num);
clique_c.traceback_find_clique();
Vector< Vector<Integer> > vector_s = clique_c.get_vector_result();//vector_s 中得到所有的派系
for(int i = 0; i < vector_s.size(); i++){
int s = vector_s.elementAt(i).size();
System.out.printf("\n\n %d派系:",s );
for(int j = 0; j < vector_s.elementAt(i).size(); j++){
System.out.printf("%d ", vector_s.elementAt(i).elementAt(j).intValue());
}
}
int k = 4;//寻找4派系社团
calculate_clique_clique_overlap_matrix c_c_matrx_deal = new calculate_clique_clique_overlap_matrix(vector_s,k);//生成派系社团重叠矩阵
// int[] c_c_matrix = c_c_matrx_deal.get_clique_clique_overlap_matrix();
int[] k_clique_matrix = c_c_matrx_deal.get_k_clique_overlap_matrix(k);//得到派系社团重叠矩阵
//boolean[] matrix_sign = new boolean[vector_s.size()];//记录那些派系是需要输出的,要输出的为true。
//Vector<Integer> vector_output = new Vector<Integer>();//把这些要输出的派系的成员点记录到这个向量中去。以便生成dot
Vector< Vector<Integer> > vector_k_clique = c_c_matrx_deal.get_vector_k_clique();
Vector< Vector<Integer> > vector_final_k_clique = c_c_matrx_deal.get_vector_final_k_clique();
System.out.println();
System.out.printf("\n\n\n%d派系社团情况如下:",k);
for(int i = 0; i < vector_k_clique.size(); i++){//定位到某个k派系社团
System.out.printf("\n\n%d派系社团%d: ",k,i);
for(int j = 0; j < vector_k_clique.elementAt(i).size(); j++){//定位到某个k派系社团中的某个派系
int num = vector_k_clique.elementAt(i).elementAt(j).intValue();//去这个派系在vector_s中的编号
int size_max = vector_s.elementAt(num).size();
System.out.printf("\n%d派系: ",size_max);
for(int s = 0; s < size_max; s++){
int point = vector_s.elementAt(num).elementAt(s).intValue();
System.out.printf("%d ",point);
}
}
}
System.out.println();
//生成dot
write_dot my_dot = new write_dot(relation_members, vector_final_k_clique, member_num);
my_dot.output_dot();
}
else{
System.out.println("找不到指定的文件");
}
}
catch(Exception e){
System.out.println("读取数据错误");
e.printStackTrace();
}
}
}