/** * Adds edges along shortest path to the two buffers. Edges in buffFwd are sorted starting at * source to target. Edges in buffBwd are sorted starting at target to source. * * @param graph to be searched * @param sourceId vertexId of target, not checked if valid. * @param targetId vertexId of target, not checked if valid. * @param dt can be null. * @param buffFwd must be empty. * @param buffBwd must be empty. * @param buffSearchSpace all relaxed edges. * @return sum of edge costs along shortest path. */ public int shortestPath( HHStaticGraph graph, int sourceId, int targetId, DistanceTable dt, LinkedList<HHStaticEdge> buffFwd, LinkedList<HHStaticEdge> buffBwd, LinkedList<HHStaticEdge> buffSearchSpace) { if (dt != null) { if (graph.getGraphPropterties().downgradedEdges) { return shortestPathDtYesDowngradedYes( graph, sourceId, targetId, dt, buffFwd, buffBwd, buffSearchSpace); } return shortestPathDtYesDowngradedNo( graph, sourceId, targetId, dt, buffFwd, buffBwd, buffSearchSpace); } if (graph.getGraphPropterties().downgradedEdges) { return shortestPathDtNoDowngradedYes( graph, sourceId, targetId, buffFwd, buffBwd, buffSearchSpace); } return shortestPathDtNoDowngradedNo( graph, sourceId, targetId, buffFwd, buffBwd, buffSearchSpace); }