Version Fonctionnelle : Ajout de Label.java
This commit is contained in:
parent
e6be4aabac
commit
2822c7ad72
1 changed files with 43 additions and 0 deletions
|
@ -0,0 +1,43 @@
|
|||
package org.insa.graphs.algorithm.shortestpath;
|
||||
|
||||
import org.insa.graphs.model.Node;
|
||||
import org.insa.graphs.model.Arc;
|
||||
|
||||
public class Label {
|
||||
private Node sommetCourant;
|
||||
private boolean marque;
|
||||
private double cout;
|
||||
private Arc pere;
|
||||
|
||||
public Label(Node init_Node) {
|
||||
this.sommetCourant = init_Node;
|
||||
this.marque = false;
|
||||
this.cout = Double.POSITIVE_INFINITY;
|
||||
this.pere = null;
|
||||
}
|
||||
|
||||
public Node getSommetCourant() {
|
||||
return this.sommetCourant;
|
||||
}
|
||||
|
||||
public boolean isMarque() {
|
||||
return this.marque;
|
||||
}
|
||||
|
||||
public double getCost() {
|
||||
return this.cout;
|
||||
}
|
||||
|
||||
public Arc getPere() {
|
||||
return this.pere;
|
||||
}
|
||||
|
||||
public void actualiser(double cout, Arc pere) {
|
||||
this.cout = cout;
|
||||
this.pere = pere;
|
||||
}
|
||||
|
||||
public void marquer() {
|
||||
this.marque = true;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue