MinGetTravelTimeFini

This commit is contained in:
Gasson-Betuing Danyl 2025-04-04 10:47:53 +02:00
parent 61b5068180
commit c2e656059a

View file

@ -30,7 +30,16 @@ public class Path {
public static Path createFastestPathFromNodes(Graph graph, List<Node> nodes) public static Path createFastestPathFromNodes(Graph graph, List<Node> nodes)
throws IllegalArgumentException { throws IllegalArgumentException {
List<Arc> arcs = new ArrayList<Arc>(); List<Arc> arcs = new ArrayList<Arc>();
// TODO:
for(Node node : nodes)
{
for( Arc arc : node.getSuccessors())
{
}
}
return new Path(graph, arcs); return new Path(graph, arcs);
} }
@ -232,8 +241,13 @@ public class Path {
* @deprecated Need to be implemented. * @deprecated Need to be implemented.
*/ */
public double getMinimumTravelTime() { public double getMinimumTravelTime() {
// TODO:
return 0; double time = 0.0;
for(Arc arcs : this.arcs)
{
time += arcs.getMinimumTravelTime();
}
return time;
} }
} }