cout du chemin
This commit is contained in:
		
							parent
							
								
									fc581c42be
								
							
						
					
					
						commit
						c20c21f527
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -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(); | ||||
|             } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue