Skip to content

Commit

Permalink
Factor out concat for Paths
Browse files Browse the repository at this point in the history
  • Loading branch information
michaz committed Jan 11, 2020
1 parent a9f53f1 commit d967567
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ private static Path concat(Graph graph, Path svPath, Path vtPath) {
for (EdgeIteratorState edge : vtPath.calcEdges()) {
path.addEdge(edge.getEdge());
}
final IntIndexedContainer vtNodes = vtPath.calcNodes();
path.setEndNode(vtNodes.get(vtNodes.size() - 1));
path.setEndNode(vtPath.getEndNode());
path.setWeight(svPath.getWeight() + vtPath.getWeight());
path.setDistance(svPath.getDistance() + vtPath.getDistance());
path.addTime(svPath.time + vtPath.time);
Expand Down

0 comments on commit d967567

Please sign in to comment.