new labelstar
这个提交包含在:
父节点
734fa38388
当前提交
64b2a4818a
共有 2 个文件被更改,包括 6 次插入 和 9 次删除
|
@ -60,16 +60,17 @@ public class Label implements Comparable<Label>{
|
|||
this.marque = true;
|
||||
}
|
||||
|
||||
/* Setter Pour Cout et Perer */
|
||||
/* Setter Pour Cout et Pere */
|
||||
public void setNouveauChemin(Arc arcPere, double coutRealise){
|
||||
this.pere = arcPere;
|
||||
this.coutRealise = coutRealise;
|
||||
}
|
||||
|
||||
public double getTotalCost() {
|
||||
return this.coutRealise + ;
|
||||
return this.coutRealise;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Compare the ID of this node with the ID of the given node.
|
||||
*
|
||||
|
|
|
@ -9,8 +9,6 @@ public class LabelStar extends Label {
|
|||
|
||||
/* ATTRIBUT */
|
||||
|
||||
private double totalCost ;
|
||||
|
||||
private double estimationCostDest ;
|
||||
|
||||
|
||||
|
@ -18,20 +16,18 @@ public class LabelStar extends Label {
|
|||
|
||||
public LabelStar(Node sommetCourant, Node Dest) {
|
||||
super(sommetCourant) ;
|
||||
this.totalCost = 0.0 ;
|
||||
this.estimationCostDest = sommetCourant.getPoint().distanceTo(Dest.getPoint());
|
||||
}
|
||||
|
||||
/* METHODES */
|
||||
|
||||
public void calculTotalCost() {
|
||||
totalCost = this.getCoutRealise() + this.estimationCostDest ;
|
||||
public double getEstimation() {
|
||||
return this.estimationCostDest ;
|
||||
}
|
||||
|
||||
public double getTotalCost() {
|
||||
return this.totalCost ;
|
||||
return this.getCoutRealise() + this.estimationCostDest ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
正在加载…
在新工单中引用