mise à jour label léa
This commit is contained in:
parent
fd94262203
commit
e537dfa8c0
1 changed files with 42 additions and 15 deletions
|
@ -1,36 +1,63 @@
|
|||
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 {
|
||||
|
||||
/* ATTRIBUTS */
|
||||
|
||||
/* 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) {
|
||||
/* CONSTRUCTEUR */
|
||||
|
||||
public Label(Node sommetCourant) {
|
||||
this.sommetCourant = sommetCourant ;
|
||||
this.marque = marque ;
|
||||
this.coutRealise = coutRealise ;
|
||||
this.pere = pere ;
|
||||
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 ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue