Example #1
0
        public static List <Point> Dijkstra
            (Point start, Point end, List <Point> polygon)
        {
            var algorithm = new RoutingAlgorithmDijkstra(start, end, polygon);

            return(Apply(algorithm));
        }
        public static List <Point> Dijkstra
            (Point start, Point end, List <Point> polygon)
        {
            var algorithm = new RoutingAlgorithmDijkstra(start, end, polygon);
            var result    = algorithm.ShortestRoute();

            return(result);
        }
Example #3
0
        static void Main(string[] args)
        {
            RoutingAlgorithm algorithm = new RoutingAlgorithmDijkstra();

            string[] input = File.ReadAllLines("obstacle.dat");
            algorithm.ParseInput(input[0], input[1], input[2]);

            var path = algorithm.ShortestRoute();
            var result = path.PolylineLength().Round(2).ToString();

            Console.WriteLine(result);
        }
Example #4
0
        static void Main(string[] args)
        {
            RoutingAlgorithm algorithm = new RoutingAlgorithmDijkstra();

            string[] input = File.ReadAllLines("obstacle.dat");
            algorithm.ParseInput(input[0], input[1], input[2]);

            var path   = algorithm.ShortestRoute();
            var result = path.PolylineLength().Round(2).ToString();

            Console.WriteLine(result);
        }
Example #5
0
 public static List<Point> Dijkstra(Point start, Point end, List<Point> polygon)
 {
     var algorithm = new RoutingAlgorithmDijkstra(start, end, polygon);
     return Apply(algorithm);
 }