diff --git a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/Marathon.java b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/Marathon.java index 01c1652..7771b80 100644 --- a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/Marathon.java +++ b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/Marathon.java @@ -47,8 +47,8 @@ public class Marathon extends ShortestPathAlgorithm { Node dest = dataInput.getOrigin().getSuccessors().get(0).getDestination() ; Label xl = tas.findMin(); - boolean possible = True ; - boolean fini = False ; + boolean possible = true ; + boolean fini = false ; // iterations while (!tas.isEmpty() && fini && possible) { @@ -56,7 +56,7 @@ public class Marathon extends ShortestPathAlgorithm { Node x = xl.getSommetCourant(); notifyNodeMarked(x); xl.marque = true; - possible = False ; + possible = false ; for (Arc a : x.getSuccessors()) { if (dataInput.isAllowed(a)) { Node n = a.getDestination(); @@ -64,8 +64,8 @@ public class Marathon extends ShortestPathAlgorithm { listLabel[n.getId()] = newLabelMarathon(n); } if (!listLabel[n.getId()].getMarque()) { - possible = True ; - listLabel[n.getId()].update(x,x.getCost()); + possible = true ; + listLabel[n.getId()].update(a, listLabel[x.getId()].getCost() + dataInput.getCost(a)); if ((!n.equals(dest)) && (listLabel[n.getId()].getCost()) < 43){ tas.insert(listLabel[n.getId()]) ; diff --git a/be-graphes-algos/target/classes/org/insa/graphs/algorithm/shortestpath/Marathon.class b/be-graphes-algos/target/classes/org/insa/graphs/algorithm/shortestpath/Marathon.class index 494128f..d377ba0 100644 Binary files a/be-graphes-algos/target/classes/org/insa/graphs/algorithm/shortestpath/Marathon.class and b/be-graphes-algos/target/classes/org/insa/graphs/algorithm/shortestpath/Marathon.class differ