label v1
This commit is contained in:
parent
fd770f091e
commit
b5db6303b9
1 changed files with 36 additions and 0 deletions
|
@ -1,5 +1,41 @@
|
||||||
package org.insa.graphs.algorithm.shortestpath;
|
package org.insa.graphs.algorithm.shortestpath;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.insa.graphs.model.Arc;
|
||||||
|
import org.insa.graphs.model.Node;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class Label {
|
public class Label {
|
||||||
|
private Node sommet;
|
||||||
|
private boolean marque;
|
||||||
|
private double cost;
|
||||||
|
private Arc parent;
|
||||||
|
private final ArrayList<Node> listLabels;
|
||||||
|
|
||||||
|
|
||||||
|
public Label(Node sommet, boolean marque, double cost, Arc parent) {
|
||||||
|
this.sommet = sommet;
|
||||||
|
this.marque = marque;
|
||||||
|
this.cost = cost;
|
||||||
|
this.parent = parent;
|
||||||
|
listLabels = new ArrayList<Node>();
|
||||||
|
listLabels.add(sommet);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Node getSommet() {
|
||||||
|
return sommet;
|
||||||
|
}
|
||||||
|
public boolean isMarque() {
|
||||||
|
return marque;
|
||||||
|
}
|
||||||
|
public double getCost() {
|
||||||
|
return cost;
|
||||||
|
}
|
||||||
|
public Arc getParent() {
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue