Maj Label Marie
This commit is contained in:
parent
fd94262203
commit
7bc2a1b71d
1 changed files with 18 additions and 16 deletions
|
@ -1,36 +1,38 @@
|
|||
package org.insa.graphs.algorithm.shortestpath;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.insa.graphs.algorithm.AbstractSolution.Status;
|
||||
import org.insa.graphs.model.Arc;
|
||||
import org.insa.graphs.model.Graph;
|
||||
import org.insa.graphs.model.Node;
|
||||
import org.insa.graphs.model.Path;
|
||||
|
||||
|
||||
public class Label {
|
||||
|
||||
/* Sommet associé à ce label (sommet ou numéro de sommet) */
|
||||
Node sommetCourant ;
|
||||
protected Node sommetCourant ;
|
||||
|
||||
/* Booléen vrai lorque le coût min de ce sommet est définitivement connu par l'algorithme */
|
||||
Boolean marque ;
|
||||
protected boolean marque ;
|
||||
|
||||
/* Valeur courante du plus court chemin depuis l'origine vers le sommet */
|
||||
double coutRealise ;
|
||||
protected double coutRealise ;
|
||||
|
||||
/* correspond au sommet précédent sur le chemin correspondant au plus court chemin courant */
|
||||
Arc pere ;
|
||||
protected Arc pere ;
|
||||
|
||||
public Label(Node sommetCourant, Boolean marque, int coutRealise, Arc pere) {
|
||||
public Label(Node sommetCourant) {
|
||||
this.sommetCourant = sommetCourant ;
|
||||
this.marque = marque ;
|
||||
this.coutRealise = coutRealise ;
|
||||
this.pere = pere ;
|
||||
this.marque = false;
|
||||
this.coutRealise = -1.0 ;
|
||||
this.pere = null ;
|
||||
}
|
||||
|
||||
public void setMarqueTrue() {
|
||||
this.marque = true;
|
||||
}
|
||||
|
||||
public void setNouveauChemin(Arc arcPere, double coutRealise){
|
||||
this.pere = arcPere;
|
||||
this.coutRealise = coutRealise;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue