Merge branch 'master' of https://git.etud.insa-toulouse.fr/brunetto/BEGraphes
This commit is contained in:
commit
854d6439f7
1 changed files with 37 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue