From dee66c624223fa175ce4fdcb1d6360729c4c447d Mon Sep 17 00:00:00 2001 From: moll Date: Tue, 12 May 2026 15:59:25 +0200 Subject: [PATCH] Update LabelStar --- .../insa/graphs/algorithm/shortestpath/LabelStar.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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()); }