final Number shortestPathDistance_ij = shortestDistanceMatrix.getDistance(sourceNode, egressNode); if (shortestPathDistance_ij == null) continue; // egress not reachable final SortedSet<Link> minCostLinks = new TreeSet<> (); if (nodePairLinks == null) continue; if (nodePairLinks.getFirst().isEmpty()) continue; final double costThroghThisIntermediate = nodePairLinks.getSecond() + shortestDistanceMatrix.getDistance(intermediateNode, egressNode).doubleValue(); if (Math.abs(shortestPathDistance_ij.doubleValue() - costThroghThisIntermediate) < 1E-10) minCostLinks.addAll(nodePairLinks.getFirst());
final Number shortestPathDistance_ij = shortestDistanceMatrix.getDistance(sourceNode, egressNode); if (shortestPathDistance_ij == null) continue; // egress not reachable final SortedSet<Link> minCostLinks = new TreeSet<> (); if (nodePairLinks == null) continue; if (nodePairLinks.getFirst().isEmpty()) continue; final Number costFromIntermediateToEnd = shortestDistanceMatrix.getDistance(intermediateNode, egressNode); if (costFromIntermediateToEnd == null) continue; final double costThroghThisIntermediate = nodePairLinks.getSecond() + costFromIntermediateToEnd.doubleValue();