diff --git a/be-graphes-model/src/main/java/org/insa/graphs/model/Path.java b/be-graphes-model/src/main/java/org/insa/graphs/model/Path.java index 5b228ce..5d23423 100644 --- a/be-graphes-model/src/main/java/org/insa/graphs/model/Path.java +++ b/be-graphes-model/src/main/java/org/insa/graphs/model/Path.java @@ -30,13 +30,36 @@ public class Path { * @throws IllegalArgumentException If the list of nodes is not valid, i.e. two * consecutive nodes in the list are not connected in the graph. * - * @deprecated Need to be implemented. + * */ public static Path createFastestPathFromNodes(Graph graph, List nodes) throws IllegalArgumentException { - List arcs = new ArrayList(); - // TODO: - return new Path(graph, arcs); + List arcs = new ArrayList(); + Arc a = null; + if (nodes.isEmpty()){ + return new Path(graph); + } else if (nodes.size() == 1){ + return new Path(graph, nodes.get(0)); + } + for (int i=0;i nodes) throws IllegalArgumentException { List arcs = new ArrayList(); - // TODO: + Arc a = null; + if (nodes.isEmpty()){ + return new Path(graph); + } else if (nodes.size() == 1){ + return new Path(graph, nodes.get(0)); + } + for (int i=0;i>>>>>> 052958ee6eb4821ebbb9c903780d467d62617fd2 ->>>>>>> 661162456a46270c315c09521ce09f85f0020150 ->>>>>>> 534e0b728e13a532d629312ec48c8c6185679721 ->>>>>>> 9512825678cb119a068d94f8af261d356638dbdd */ public double getTravelTime(double speed) { double TotalTime = 0; diff --git a/be-graphes-model/target/classes/org/insa/graphs/model/Path.class b/be-graphes-model/target/classes/org/insa/graphs/model/Path.class index 667634c..f709685 100644 Binary files a/be-graphes-model/target/classes/org/insa/graphs/model/Path.class and b/be-graphes-model/target/classes/org/insa/graphs/model/Path.class differ