@Override public String toString() { String algo = opts.getAlgorithm(); if (getExpectedAlgo().contains("landmarks")) algo += "|landmarks"; if (forQueryGraph instanceof CHGraph) algo += "|ch"; return "algoEntry(" + algo + ")"; } }
private AbstractBidirAlgo doCreateAlgo(Graph graph, AlgorithmOptions opts) { if (ASTAR_BI.equals(opts.getAlgorithm())) { return new AStarBidirectionCH(graph, prepareWeighting, traversalMode) .setApproximation(RoutingAlgorithmFactorySimple.getApproximation(ASTAR_BI, opts, graph.getNodeAccess())); } else if (DIJKSTRA_BI.equals(opts.getAlgorithm())) { if (opts.getHints().getBool("stall_on_demand", true)) { return new DijkstraBidirectionCH(graph, prepareWeighting, traversalMode); } else { return new DijkstraBidirectionCHNoSOD(graph, prepareWeighting, traversalMode); } } else { throw new IllegalArgumentException("Algorithm " + opts.getAlgorithm() + " not supported for Contraction Hierarchies. Try with ch.disable=true"); } }
/** * This method clones the specified AlgorithmOption object with the possibility for further * changes. */ public static Builder start(AlgorithmOptions opts) { Builder b = new Builder(); if (opts.algorithm != null) b.algorithm(opts.getAlgorithm()); if (opts.traversalMode != null) b.traversalMode(opts.getTraversalMode()); if (opts.weighting != null) b.weighting(opts.getWeighting()); if (opts.maxVisitedNodes >= 0) b.maxVisitedNodes(opts.maxVisitedNodes); if (!opts.hints.isEmpty()) b.hints(opts.hints); return b; }
@Override public RoutingAlgorithm createAlgo(Graph g, AlgorithmOptions opts) { RoutingAlgorithm ra; String algoStr = opts.getAlgorithm(); if (DIJKSTRA_BI.equalsIgnoreCase(algoStr)) { ra = new DijkstraBidirectionRef(g, opts.getWeighting(), opts.getTraversalMode());
@Override public String toString() { return opts.getAlgorithm() + (queryGraph instanceof CHGraph ? "CH" : ""); } }
@Override public String toString() { String algo = opts.getAlgorithm(); if (getExpectedAlgo().contains("landmarks")) algo += "|landmarks"; if (forQueryGraph instanceof CHGraph) algo += "|ch"; return "algoEntry(" + algo + ")"; } }
@Override public String toString() { String algo = opts.getAlgorithm(); if (getExpectedAlgo().contains("landmarks")) algo += "|landmarks"; if (forQueryGraph instanceof CHGraph) algo += "|ch"; return "algoEntry(" + 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; }
private AbstractBidirAlgo doCreateAlgo(Graph graph, AlgorithmOptions opts) { if (ASTAR_BI.equals(opts.getAlgorithm())) { return new AStarBidirectionCH(graph, prepareWeighting, traversalMode) .setApproximation(RoutingAlgorithmFactorySimple.getApproximation(ASTAR_BI, opts, graph.getNodeAccess())); } else if (DIJKSTRA_BI.equals(opts.getAlgorithm())) { if (opts.getHints().getBool("stall_on_demand", true)) { return new DijkstraBidirectionCH(graph, prepareWeighting, traversalMode); } else { return new DijkstraBidirectionCHNoSOD(graph, prepareWeighting, traversalMode); } } else { throw new IllegalArgumentException("Algorithm " + opts.getAlgorithm() + " not supported for Contraction Hierarchies. Try with ch.disable=true"); } }
@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; }
/** * This method clones the specified AlgorithmOption object with the possibility for further * changes. */ public static Builder start(AlgorithmOptions opts) { Builder b = new Builder(); if (opts.algorithm != null) b.algorithm(opts.getAlgorithm()); if (opts.traversalMode != null) b.traversalMode(opts.getTraversalMode()); if (opts.weighting != null) b.weighting(opts.getWeighting()); if (opts.maxVisitedNodes >= 0) b.maxVisitedNodes(opts.maxVisitedNodes); if (!opts.hints.isEmpty()) b.hints(opts.hints); return b; }
/** * This method clones the specified AlgorithmOption object with the possibility for further * changes. */ public static Builder start(AlgorithmOptions opts) { Builder b = new Builder(); if (opts.algorithm != null) b.algorithm(opts.getAlgorithm()); if (opts.traversalMode != null) b.traversalMode(opts.getTraversalMode()); if (opts.weighting != null) b.weighting(opts.getWeighting()); if (opts.maxVisitedNodes >= 0) b.maxVisitedNodes(opts.maxVisitedNodes); if (!opts.hints.isEmpty()) b.hints(opts.hints); return b; }
/** * This method clones the specified AlgorithmOption object with the possibility for further * changes. */ public static Builder start( AlgorithmOptions opts ) { Builder b = new Builder(); if (opts.algorithm != null) b.algorithm(opts.getAlgorithm()); if (opts.flagEncoder != null) b.flagEncoder(opts.getFlagEncoder()); if (opts.traversalMode != null) b.traversalMode(opts.getTraversalMode()); if (opts.weighting != null) b.weighting(opts.getWeighting()); if (opts.maxVisitedNodes >= 0) b.maxVisitedNodes(opts.maxVisitedNodes); return b; }
@Override public RoutingAlgorithm createAlgo(Graph g, AlgorithmOptions opts) { RoutingAlgorithm ra; String algoStr = opts.getAlgorithm(); if (DIJKSTRA_BI.equalsIgnoreCase(algoStr)) { ra = new DijkstraBidirectionRef(g, opts.getWeighting(), opts.getTraversalMode());
@Override public RoutingAlgorithm createAlgo(Graph g, AlgorithmOptions opts) { RoutingAlgorithm ra; String algoStr = opts.getAlgorithm(); if (DIJKSTRA_BI.equalsIgnoreCase(algoStr)) { ra = new DijkstraBidirectionRef(g, opts.getWeighting(), opts.getTraversalMode());
String algoStr = opts.getAlgorithm(); if (DIJKSTRA_BI.equalsIgnoreCase(algoStr))