@Override public void updateBestPath(EdgeIteratorState edgeState, SPTEntry entry, int traversalId, boolean reverse) { if (g2 != null) { mg.plotNode(g2, traversalId, Color.YELLOW); } super.updateBestPath(edgeState, entry, traversalId, reverse); }
@Override public void initTo(int to, double weight) { currTo = new AStarEntry(EdgeIterator.NO_EDGE, to, weight, weight); weightApprox.setTo(to); prioQueueOpenSetTo.add(currTo); if (currFrom != null) { currFrom.weight += weightApprox.approximate(currFrom.adjNode, false); currTo.weight += weightApprox.approximate(currTo.adjNode, true); } if (!traversalMode.isEdgeBased()) { bestWeightMapTo.put(to, currTo); if (currFrom != null) { bestWeightMapOther = bestWeightMapFrom; updateBestPath(GHUtility.getEdge(graph, currFrom.adjNode, to), currFrom, to); } } else if (currFrom != null && currFrom.adjNode == to) { // special case of identical start and end bestPath.sptEntry = currFrom; bestPath.edgeTo = currTo; finishedFrom = true; finishedTo = true; } }
@Override public void initFrom(int from, double weight) { currFrom = new AStarEntry(EdgeIterator.NO_EDGE, from, weight, weight); weightApprox.setFrom(from); prioQueueOpenSetFrom.add(currFrom); if (currTo != null) { currFrom.weight += weightApprox.approximate(currFrom.adjNode, false); currTo.weight += weightApprox.approximate(currTo.adjNode, true); } if (!traversalMode.isEdgeBased()) { bestWeightMapFrom.put(from, currFrom); if (currTo != null) { bestWeightMapOther = bestWeightMapTo; updateBestPath(GHUtility.getEdge(graph, from, currTo.adjNode), currTo, from); } } else if (currTo != null && currTo.adjNode == from) { // special case of identical start and end bestPath.sptEntry = currFrom; bestPath.edgeTo = currTo; finishedFrom = true; finishedTo = true; } }
updateBestPath(GHUtility.getEdge(graph, from, currTo.adjNode), currTo, from);
updateBestPath(GHUtility.getEdge(graph, currFrom.adjNode, to), currFrom, to);
updateBestPath(iter, ase, traversalId);
updateBestPath(iter, ase, traversalId);