diff --git a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/LabelStar.java b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/LabelStar.java index 58ea349..c773c1e 100644 --- a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/LabelStar.java +++ b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/LabelStar.java @@ -20,9 +20,14 @@ public class LabelStar extends Label { return volOiseau; } + @Override + public double getCost() { + return super.getCost() + this.volOiseau; + } + public int compareTo(LabelStar o) { - double coutthis = this.volOiseau + this.getCost(); - double coutautre = o.getVolOiseau() + o.getCost(); + double coutthis = this.getCost(); + double coutautre = o.getCost(); if (coutthis == coutautre) { return Double.compare(this.volOiseau, o.getVolOiseau()); }