cout du chemin

This commit is contained in:
Georgia Koutsodima 2023-05-02 19:08:23 +02:00
parent fc581c42be
commit c20c21f527

View file

@ -75,9 +75,11 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
else {
ArrayList<Arc> arcs = new ArrayList<>();
Double cout=0.0; /*cout du chemin */
Arc arc = label_dest.getPere();
while (arc != null) {
arcs.add(arc);
cout+= data.getCost(arc);
arc = tab.get(arc.getOrigin().getId()).getPere();
}