faux
This commit is contained in:
부모
45f43559ff
커밋
f69318c33d
2개의 변경된 파일과 5개의 추가작업 그리고 1개의 파일을 삭제
|
|
@ -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.
불러오는 중…
Reference in a new issue