@Override public boolean finished() { // we need to finish BOTH searches identical to CH if (finishedFrom && finishedTo) return true; if (isMaxVisitedNodesExceeded()) return true; // The following condition is necessary to avoid traversing the full graph if areas are disconnected // but it is only valid for none-CH e.g. for CH it can happen that finishedTo is true but the from-SPT could still reach 'to' if (!bestPath.isFound() && (finishedFrom || finishedTo)) return true; // increase overlap of both searches: return currFrom.weight + currTo.weight > explorationFactor * bestPath.getWeight(); // This is more precise but takes roughly 20% longer: return currFrom.weight > bestPath.getWeight() && currTo.weight > bestPath.getWeight(); // For bidir A* and AStarEdge.getWeightOfVisitedPath see comment in AStarBidirection.finished }
@Override public boolean finished() { // we need to finish BOTH searches identical to CH if (finishedFrom && finishedTo) return true; if (isMaxVisitedNodesExceeded()) return true; // The following condition is necessary to avoid traversing the full graph if areas are disconnected // but it is only valid for none-CH e.g. for CH it can happen that finishedTo is true but the from-SPT could still reach 'to' if (!bestPath.isFound() && (finishedFrom || finishedTo)) return true; // increase overlap of both searches: return currFrom.weight + currTo.weight > explorationFactor * bestPath.getWeight(); // This is more precise but takes roughly 20% longer: return currFrom.weight > bestPath.getWeight() && currTo.weight > bestPath.getWeight(); // For bidir A* and AStarEdge.getWeightOfVisitedPath see comment in AStarBidirection.finished }
@Override public boolean finished() { // we need to finish BOTH searches identical to CH if (finishedFrom && finishedTo) return true; if (isMaxVisitedNodesExceeded()) return true; // The following condition is necessary to avoid traversing the full graph if areas are disconnected // but it is only valid for none-CH e.g. for CH it can happen that finishedTo is true but the from-SPT could still reach 'to' if (!bestPath.isFound() && (finishedFrom || finishedTo)) return true; // increase overlap of both searches: return currFrom.weight + currTo.weight > explorationFactor * bestPath.getWeight(); // This is more precise but takes roughly 20% longer: return currFrom.weight > bestPath.getWeight() && currTo.weight > bestPath.getWeight(); // For bidir A* and AStarEdge.getWeightOfVisitedPath see comment in AStarBidirection.finished }
@Override public boolean finished() { // we need to finish BOTH searches identical to CH if (finishedFrom && finishedTo) return true; if (isMaxVisitedNodesExceeded()) return true; // The following condition is necessary to avoid traversing the full graph if areas are disconnected // but it is only valid for none-CH e.g. for CH it can happen that finishedTo is true but the from-SPT could still reach 'to' if (!bestPath.isFound() && (finishedFrom || finishedTo)) return true; // increase overlap of both searches: return currFrom.weight + currTo.weight > explorationFactor * bestPath.getWeight(); // This is more precise but takes roughly 20% longer: return currFrom.weight > bestPath.getWeight() && currTo.weight > bestPath.getWeight(); // For bidir A* and AStarEdge.getWeightOfVisitedPath see comment in AStarBidirection.finished }