@Override public RoutingAlgorithm createAlgo(Graph g, AlgorithmOptions opts) { return new AStar(g, opts.getWeighting(), traversalMode); } };
AStar aStar = new AStar(g, opts.getWeighting(), opts.getTraversalMode()); aStar.setApproximation(getApproximation(ASTAR, opts, g.getNodeAccess())); ra = aStar;
prepare.doWork(); AStar expectedAlgo = new AStar(graph, weighting, tm); Path expectedPath = expectedAlgo.calcPath(41, 183); RoutingAlgorithm oneDirAlgoWithLandmarks = prepare.getDecoratedAlgorithm(graph, new AStar(graph, weighting, tm), opts); Path path = oneDirAlgoWithLandmarks.calcPath(41, 183); qGraph.lookup(fromQR, toQR); RoutingAlgorithm qGraphOneDirAlgo = prepare.getDecoratedAlgorithm(qGraph, new AStar(qGraph, weighting, tm), opts); path = qGraphOneDirAlgo.calcPath(fromQR.getClosestNode(), toQR.getClosestNode()); expectedAlgo = new AStar(qGraph, weighting, tm); expectedPath = expectedAlgo.calcPath(fromQR.getClosestNode(), toQR.getClosestNode()); assertEquals(expectedPath.getWeight(), path.getWeight(), .1);
AStar aStar = new AStar(g, opts.getWeighting(), opts.getTraversalMode()); aStar.setApproximation(getApproximation(ASTAR, opts, g.getNodeAccess())); ra = aStar;
AStar aStar = new AStar(g, opts.getWeighting(), opts.getTraversalMode()); aStar.setApproximation(getApproximation(ASTAR, opts, g.getNodeAccess())); ra = aStar;
AStar aStar = new AStar(g, opts.getFlagEncoder(), opts.getWeighting(), opts.getTraversalMode()); aStar.setApproximation(getApproximation(ASTAR, opts, g.getNodeAccess())); ra = aStar;