faux
This commit is contained in:
parent
45f43559ff
commit
f69318c33d
2 changed files with 5 additions and 1 deletions
|
@ -38,7 +38,7 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
|||
Tas.insert(List.get(data.getOrigin().getId()));
|
||||
int i = 1;
|
||||
Label x;
|
||||
while (MarqueExiste(List) && dest.isMarque() == false){
|
||||
while (dest.isMarque() == false){
|
||||
x = Tas.findMin();
|
||||
x.setMarque(true);
|
||||
Tas.deleteMin();
|
||||
|
@ -56,6 +56,7 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
|||
System.out.println("arc");
|
||||
}else if (l.getCost() < arcs.get(i-1).getLength()){
|
||||
arcs.remove(i-1);
|
||||
System.out.println("remove");
|
||||
}
|
||||
Tas.insert(l);
|
||||
l.setParent(suivant);
|
||||
|
@ -69,7 +70,10 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
|||
}
|
||||
i++;
|
||||
}
|
||||
System.out.println(data.getDestination());
|
||||
System.out.println(dest.getSommet());
|
||||
System.out.println(arcs);
|
||||
System.out.println(arcs.get(arcs.size()-1).getDestination());
|
||||
solution = new ShortestPathSolution(data, Status.OPTIMAL, new Path(data.getGraph(), arcs));
|
||||
return solution;
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue