示例#1
0
        private static void DoStraightRoutes(Graph graph, List<IResponse> responses)
        {
            var routeFinder = new RouteFinder(graph);

            responses.Add(routeFinder.FindRoute(new RouteRequest('A', 'B', 'C')));
            responses.Add(routeFinder.FindRoute(new RouteRequest('A', 'D')));
            responses.Add(routeFinder.FindRoute(new RouteRequest('A', 'D', 'C')));
            responses.Add(routeFinder.FindRoute(new RouteRequest('A', 'E', 'B', 'C', 'D')));
            responses.Add(routeFinder.FindRoute(new RouteRequest('A', 'E', 'D')));
        }
示例#2
0
        private static void DoMaxTripFinder(Graph graph, List<IResponse> responses)
        {
            var maxTripFinder = new MaxStopTripFinder(graph);

            responses.Add(maxTripFinder.FindTrip('C', 'C'));
        }
示例#3
0
        private static void DoNumberOfRoutesFinder(Graph graph, List<IResponse> responses)
        {
            var numberOfRoutesFinder = new NumberOfRoutesFinder(graph);

            responses.Add(numberOfRoutesFinder.FindRoutes('C', 'C').WithDistanceLessThan(30));
        }
示例#4
0
        private static void DoExactTripFinder(Graph graph, List<IResponse> responses)
        {
            var exactTripFinder = new ExactStopTripFinder(graph);

            responses.Add(exactTripFinder.FindTrip('A', 'C'));
        }