示例#1
0
        //compare distance to target using the heuristic provided
        public int CompareTo(object obj)
        {
            if (this == obj)
            {
                return(0);
            }

            var result1 = heuristic.HueristicDistanceToTarget(Vertex, destinationVertex);
            var result2 = heuristic.HueristicDistanceToTarget((obj as AStarWrap <T, W>).Vertex, destinationVertex);

            return(result1.CompareTo(result2));
        }
示例#2
0
        //compare distance to target using the heuristic provided
        public int CompareTo(AStarWrap <T, W> other)
        {
            if (this == other)
            {
                return(0);
            }

            var result1 = heuristic.HueristicDistanceToTarget(Vertex, destinationVertex);
            var result2 = heuristic.HueristicDistanceToTarget(other.Vertex, destinationVertex);

            return(result1.CompareTo(result2));
        }