label
This commit is contained in:
		
							parent
							
								
									d9e7c9df3b
								
							
						
					
					
						commit
						108e795bd9
					
				
					 1 changed files with 35 additions and 0 deletions
				
			
		|  | @ -0,0 +1,35 @@ | |||
| package org.insa.graphs.algorithm.shortestpath; | ||||
| import org.insa.graphs.model.Node; | ||||
| 
 | ||||
| public class Label{ | ||||
|       | ||||
|     /*sommet associé au label */ | ||||
|     private Node sommet; | ||||
|     /*marque, vrai lorsque le coût min de ce sommet est définitivement connu par l'algorithme*/ | ||||
|     private boolean marque; | ||||
|     /*valeur courante du plus court chemin */ | ||||
|     private int coutmin; | ||||
|     /*sommet précédent sur le chemin correspondant au plus court chemin courant */ | ||||
|     private Node pere; | ||||
| 
 | ||||
|     /*Constructeur */ | ||||
|     public Label(Node sommet, boolean marque, int coutmin, Node pere){ | ||||
|         this.sommet=sommet; | ||||
|         this.marque=marque; | ||||
|         this.coutmin=coutmin; | ||||
|         this.pere=pere; | ||||
|     } | ||||
| 
 | ||||
|     /*méthodes */ | ||||
|     /*récupérer le cout */ | ||||
|     public int getCost() { return this.coutmin;} | ||||
|     /*récupérer le cout réalisé */ | ||||
|     public int getCout() { return this.coutmin;} | ||||
|     /*récupérer le sommet du label */ | ||||
|     public Node getSommet() { return this.sommet;} | ||||
|     /*récupérer la marque */ | ||||
|     public boolean getMarque() { return this.marque;} | ||||
|     /*récupérer le père */ | ||||
|     public Node getPere() { return this.pere;} | ||||
| 
 | ||||
| } | ||||
		Loading…
	
		Reference in a new issue