51,397
社区成员




public class Sort1 {
static int t=544;
public static void main (String[] args) throws IOException {
int t=5;
TxtInput input=new TxtInput("e:/bishe/B.txt");
double[][] aaa=new double[t][t];
input.setSource(aaa);
aaa=input.get_source();
double max=0;
// locateI记录位置
int locateI=0;
for(int i=0;i<t;i++){
if(max<aaa[i][i]){max=aaa[i][i];locateI=i;}
}
System.out.println(max+" "+locateI);
TxtInput input2=new TxtInput("e:/bishe/X.txt");
double[][] a2=new double[t][t];
input2.setSource(a2);
a2=input2.get_source();
for(int i=0;i<t;i++){
// if(a2[i][locateI])
System.out.print(a2[i][locateI]+" ");
} String filename = "E:\\bishe\\karate.gml";
InitialGraph ing = new InitialGraph(filename);
ing.initial();
Iterator<Entry<Integer, Vertex>> itor = ing.g.getVertex().entrySet().iterator();
System.out.println();//蓝色部分加上后,要正常输出就要加这句
while(itor.hasNext())
{
Entry<Integer, Vertex> e = itor.next();//从第二个元素开始了?
System.out.println(e.getKey());
}
}
}