This commit is contained in:
Marie Brunetto 2023-03-29 17:01:04 +02:00
commit 854d6439f7

View file

@ -5,6 +5,8 @@ import org.insa.graphs.model.Node;
public class Label {
/* ATTRIBUTS */
/* Sommet associé à ce label (sommet ou numéro de sommet) */
protected Node sommetCourant ;
@ -17,22 +19,55 @@ public class Label {
/* correspond au sommet précédent sur le chemin correspondant au plus court chemin courant */
protected Arc pere ;
/* CONSTRUCTEUR */
public Label(Node sommetCourant) {
this.sommetCourant = sommetCourant ;
this.marque = false;
this.coutRealise = -1.0 ;
this.marque = false ;
this.coutRealise = -1.0 ; //infini
this.pere = null ;
}
/* METHODES */
/* Getter pour sommetCourant */
public Node getSommetCourant() {
return this.sommetCourant ;
}
/* Getter pour marque */
public boolean getMarque() {
return this.marque ;
}
/* Getter pour coutRealise */
public double getCoutRealise() {
return this.coutRealise ;
}
/* Getter pour cout */
public double getCost() {
return this.coutRealise ;
}
/* Getter pour pere */
public Arc getPere() {
return this.pere ;
}
/* Setter Pour Marque */
public void setMarqueTrue() {
this.marque = true;
}
/* Setter Pour Cout et Perer */
public void setNouveauChemin(Arc arcPere, double coutRealise){
this.pere = arcPere;
this.coutRealise = coutRealise;
}
}