public voidinit(String filename) throws FileNotFoundException, IOException{
//读取数据
double[] x;
double[] y;
int num;
String strbuff;
BufferedReader tspdata = newBufferedReader(new InputStreamReader(new FileInputStream(filename)));
strbuff = tspdata.readLine();
int num = Integer.valueOf(strbuff);
// System.out.println(Integer.valueOf(strbuff));
x = new double[num];
y = new double[num];
for (int citys = 0; citys strbuff = tspdata.readLine(); String[] strcol =strbuff.split(","); x[citys] = Integer.valueOf(strcol[1]); y[citys] =Integer.valueOf(strcol[2]); } }