From 52a8945a916c691986afe0ea44f71817aef935d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yanis=20Mah=C3=A9?= Date: Thu, 16 Apr 2026 09:47:29 +0200 Subject: [PATCH] Added constructor for label and changed coutRealise to double --- .../insa/graphs/algorithm/shortestpath/Label.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/Label.java b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/Label.java index 17ff9d2..4ceaf5b 100644 --- a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/Label.java +++ b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/Label.java @@ -9,9 +9,15 @@ public class Label { private Boolean marque; - private int coutRealise; + private double coutRealise; private Arc pere; + + public Label(Node sommetCourant) { + this.sommetCourant = sommetCourant; + this.marque = false; + this.coutRealise = Double.POSITIVE_INFINITY; + } public Node getSommetCourant() { return sommetCourant; @@ -25,13 +31,12 @@ public class Label { return pere; } - public int getCoutRealise() { + public double getCoutRealise() { return coutRealise; } - public int getCost() { + public double getCost() { return coutRealise; } - }