From c6814121a42df9f88ddee0039113f8d054c2f542 Mon Sep 17 00:00:00 2001 From: Pellerin Tiphaine Date: Tue, 12 May 2026 17:43:43 +0200 Subject: [PATCH] =?UTF-8?q?plus=20rien=20ne=20marche,=20on=20a=20chang?= =?UTF-8?q?=C3=A9=20l'endroit=20de=20cr=C3=A9ation=20des=20labels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .Rhistory | 0 .../shortestpath/AStarAlgorithm.java | 98 ++++++++++++++++++ .../shortestpath/BellmanFordAlgorithm.java | 2 +- .../shortestpath/DijkstraAlgorithm.java | 27 +++-- .../graphs/algorithm/shortestpath/Label.java | 17 ++- .../algorithm/shortestpath/LabelStar.java | 24 +++++ .../shortestpath/AStarAlgorithm.class | Bin 524 -> 979 bytes .../shortestpath/BellmanFordAlgorithm.class | Bin 4080 -> 4080 bytes .../shortestpath/DijkstraAlgorithm.class | Bin 5139 -> 5406 bytes .../graphs/algorithm/shortestpath/Label.class | Bin 1610 -> 1528 bytes .../algorithm/shortestpath/LabelStar.class | Bin 0 -> 1062 bytes .../org/insa/graphs/gui/simple/Launch.java | 27 +++++ .../org/insa/graphs/gui/simple/Launch$1.class | Bin 1292 -> 1292 bytes .../org/insa/graphs/gui/simple/Launch.class | Bin 2956 -> 4691 bytes .../main/java/org/insa/graphs/model/Path.java | 2 - .../classes/org/insa/graphs/model/Path.class | Bin 6443 -> 6437 bytes 16 files changed, 172 insertions(+), 25 deletions(-) create mode 100644 .Rhistory create mode 100644 be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/LabelStar.java create mode 100644 be-graphes-algos/target/classes/org/insa/graphs/algorithm/shortestpath/LabelStar.class diff --git a/.Rhistory b/.Rhistory new file mode 100644 index 0000000..e69de29 diff --git a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/AStarAlgorithm.java b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/AStarAlgorithm.java index fd172f0..f15c7a0 100644 --- a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/AStarAlgorithm.java +++ b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/AStarAlgorithm.java @@ -1,9 +1,107 @@ package org.insa.graphs.algorithm.shortestpath; +import java.util.ArrayList; +import java.util.Collections; + +import org.insa.graphs.algorithm.AbstractSolution.Status; +import org.insa.graphs.algorithm.utils.BinaryHeap; +import org.insa.graphs.model.Arc; +import org.insa.graphs.model.Graph; +import org.insa.graphs.model.Node; +import org.insa.graphs.model.Path; + public class AStarAlgorithm extends DijkstraAlgorithm { public AStarAlgorithm(ShortestPathData data) { super(data); } + @Override + public ShortestPathSolution doRun() { + + System.out.println("on est dans l'algo"); + // retrieve data from the input problem (getInputData() is inherited from the + // parent class ShortestPathAlgorithm) + final ShortestPathData data = getInputData(); + Graph graph = data.getGraph(); + final int nbNodes = graph.size(); + // ArrayList