Debut Astar
This commit is contained in:
		
							parent
							
								
									72ee91ff74
								
							
						
					
					
						commit
						65f19a9876
					
				
					 1 changed files with 26 additions and 0 deletions
				
			
		|  | @ -0,0 +1,26 @@ | |||
| package org.insa.graphs.algorithm.shortestpath; | ||||
| 
 | ||||
| 
 | ||||
| import org.insa.graphs.model.Arc; | ||||
| import org.insa.graphs.model.Node; | ||||
| 
 | ||||
| 
 | ||||
| public class LabelStar extends Label { | ||||
|     private double cost_Destination; | ||||
|     private double cost_Origin; | ||||
| 
 | ||||
|     public LabelStar(Node sommet, double cost_Origin,double cost_Destination, Arc parent) | ||||
|     { | ||||
|         super(sommet, cost_Origin, parent); | ||||
|         this.cost_Origin = cost_Origin; | ||||
|         this.cost_Destination=cost_Destination; | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @Override | ||||
|     public double getTotalCost() { | ||||
|         return cost_Destination+cost_Origin; | ||||
|     } | ||||
|      | ||||
| } | ||||
		Loading…
	
		Reference in a new issue