Debut Astar

This commit is contained in:
El Haji Fofana 2023-05-18 13:24:25 +02:00
parent 72ee91ff74
commit 65f19a9876

View file

@ -0,0 +1,26 @@
package org.insa.graphs.algorithm.shortestpath;
import org.insa.graphs.model.Arc;
import org.insa.graphs.model.Node;
public class LabelStar extends Label {
private double cost_Destination;
private double cost_Origin;
public LabelStar(Node sommet, double cost_Origin,double cost_Destination, Arc parent)
{
super(sommet, cost_Origin, parent);
this.cost_Origin = cost_Origin;
this.cost_Destination=cost_Destination;
}
@Override
public double getTotalCost() {
return cost_Destination+cost_Origin;
}
}