@Override public RoutingAlgorithm createAlgo(Graph graph, AlgorithmOptions opts) { AbstractBidirAlgo algo = doCreateAlgo(graph, opts); algo.setEdgeFilter(new LevelEdgeFilter(prepareGraph)); algo.setMaxVisitedNodes(opts.getMaxVisitedNodes()); return algo; }
@Override public RoutingAlgorithm createAlgo(Graph graph, AlgorithmOptions opts) { AbstractBidirAlgo algo = doCreateAlgo(graph, opts); algo.setEdgeFilter(new LevelEdgeFilter(prepareGraph)); algo.setMaxVisitedNodes(opts.getMaxVisitedNodes()); return algo; }
@Override public RoutingAlgorithm createAlgo( Graph graph, AlgorithmOptions opts ) { AbstractBidirAlgo algo; if (ASTAR_BI.equals(opts.getAlgorithm())) { algo = createAStarBidirection(graph); } else if (DIJKSTRA_BI.equals(opts.getAlgorithm())) { algo = createDijkstraBidirection(graph); } else { throw new UnsupportedOperationException("Algorithm " + opts.getAlgorithm() + " not supported for Contraction Hierarchies"); } algo.setMaxVisitedNodes(opts.getMaxVisitedNodes()); algo.setEdgeFilter(levelFilter); return algo; }
@Override public RoutingAlgorithm createAlgo(Graph graph, AlgorithmOptions opts) { AbstractBidirAlgo algo; if (ASTAR_BI.equals(opts.getAlgorithm())) { AStarBidirection tmpAlgo = new AStarBidirectionCH(graph, prepareWeighting, traversalMode); tmpAlgo.setApproximation(RoutingAlgorithmFactorySimple.getApproximation(ASTAR_BI, opts, graph.getNodeAccess())); algo = tmpAlgo; } else if (DIJKSTRA_BI.equals(opts.getAlgorithm())) { algo = new DijkstraBidirectionCH(graph, prepareWeighting, traversalMode); } else { throw new IllegalArgumentException("Algorithm " + opts.getAlgorithm() + " not supported for Contraction Hierarchies. Try with ch.disable=true"); } algo.setMaxVisitedNodes(opts.getMaxVisitedNodes()); algo.setEdgeFilter(levelFilter); return algo; }