示例#1
0
        public double DistanceFrom(Point point)
        {
            double distance1 = TSP.distance(this.p1, point);
            double distance2 = TSP.distance(this.p2, point);

            return(distance1 + distance2 - this.length);
        }
示例#2
0
        public TSPEdge(Point point1, Point point2)
        {
            this.p1 = point1;
            this.p2 = point2;

            this.length = TSP.distance(p1, p2);
        }