@Override public void initTo(int to, double weight) { currTo = createSPTEntry(to, weight); openSetTo.add(currTo); 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 = createSPTEntry(from, weight); openSetFrom.add(currFrom); 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; } }
@Override public void initFrom( int from, double weight ) { currFrom = createSPTEntry(from, weight); openSetFrom.add(currFrom); 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; } } }
@Override public void initTo( int to, double weight ) { currTo = createSPTEntry(to, weight); openSetTo.add(currTo); 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; } } }