This commit is contained in:
Bensouda Idriss 2023-04-04 17:03:58 +02:00
parent fd770f091e
commit b5db6303b9

View file

@ -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;
}
} }