diff --git a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/Label.java b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/Label.java new file mode 100644 index 0000000..80d4330 --- /dev/null +++ b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/Label.java @@ -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;} + +} \ No newline at end of file