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()));
|
Tas.insert(List.get(data.getOrigin().getId()));
|
||||||
int i = 1;
|
int i = 1;
|
||||||
Label x;
|
Label x;
|
||||||
while (MarqueExiste(List) && dest.isMarque() == false){
|
while (dest.isMarque() == false){
|
||||||
x = Tas.findMin();
|
x = Tas.findMin();
|
||||||
x.setMarque(true);
|
x.setMarque(true);
|
||||||
Tas.deleteMin();
|
Tas.deleteMin();
|
||||||
|
@ -56,6 +56,7 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
||||||
System.out.println("arc");
|
System.out.println("arc");
|
||||||
}else if (l.getCost() < arcs.get(i-1).getLength()){
|
}else if (l.getCost() < arcs.get(i-1).getLength()){
|
||||||
arcs.remove(i-1);
|
arcs.remove(i-1);
|
||||||
|
System.out.println("remove");
|
||||||
}
|
}
|
||||||
Tas.insert(l);
|
Tas.insert(l);
|
||||||
l.setParent(suivant);
|
l.setParent(suivant);
|
||||||
|
@ -69,7 +70,10 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
System.out.println(data.getDestination());
|
||||||
|
System.out.println(dest.getSommet());
|
||||||
System.out.println(arcs);
|
System.out.println(arcs);
|
||||||
|
System.out.println(arcs.get(arcs.size()-1).getDestination());
|
||||||
solution = new ShortestPathSolution(data, Status.OPTIMAL, new Path(data.getGraph(), arcs));
|
solution = new ShortestPathSolution(data, Status.OPTIMAL, new Path(data.getGraph(), arcs));
|
||||||
return solution;
|
return solution;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue