/** * Logic that was previously located in the relaxNode(...) method. * By doing so, the FastDijkstra can overwrite relaxNode without copying the logic. */ /*package*/ void relaxNodeLogic(final Link l, final RouterPriorityQueue<Node> pendingNodes, final double currTime, final double currCost, final Node toNode, final PreProcessDijkstra.DeadEndData ddOutData) { if (this.pruneDeadEnds) { if (canPassLink(l)) { Node n = l.getToNode(); PreProcessDijkstra.DeadEndData ddData = getPreProcessData(n); /* IF the current node n is not in a dead end * OR it is in the same dead end as the fromNode * OR it is in the same dead end as the toNode * THEN we add the current node to the pending nodes */ if ((ddData.getDeadEndEntryNode() == null) || (ddOutData.getDeadEndEntryNode() != null) || ((this.deadEndEntryNode != null) && (this.deadEndEntryNode.getId() == ddData.getDeadEndEntryNode().getId()))) { addToPendingNodes(l, n, pendingNodes, currTime, currCost, toNode); } } } else { if (canPassLink(l)) { addToPendingNodes(l, l.getToNode(), pendingNodes, currTime, currCost, toNode); } } }