using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Tspform { class Wj { // static int N = 100; // private int[] route; // private double[,] dij; public static int startcityNumber = -1; public double Getdistance(double x1, double y1, double x2, double y2) { double distance; distance = Math.Sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); return distance; } /* public override double AllRoute(int j)//calculate the final route of the ant ,parameter j is useless,default is zero { double distance = 0; for (int i = 0; i < N - 1; i++) { distance = distance + this.dij[route[i], this.route[i + 1]]; } distance = distance + dij[route[N - 1], this.route[0]]; return distance; } */ } }