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 0fd92e9..b6eb926 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,12 +30,43 @@ 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: + List arcs = new ArrayList(); + double min_time; + Arc min_a=null; + Arc a; + boolean found; + if (nodes.size()==1) + { + return new Path(graph,nodes.get(0)); + + } + for(int i=0;i nodes) throws IllegalArgumentException { 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 bb120ef..a84c516 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