From 07e85edc3caca47f88204526c74b93f18c2726fe Mon Sep 17 00:00:00 2001 From: Pellerin Tiphaine Date: Tue, 19 May 2026 17:54:09 +0200 Subject: [PATCH] =?UTF-8?q?fin=20de=20Dijkstra=20et=20A=20*,=20avanc=C3=A9?= =?UTF-8?q?=20sur=20la=20classe=20de=20tests=20Launch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shortestpath/AStarAlgorithm.java | 30 ++-- .../shortestpath/DijkstraAlgorithm.java | 3 +- .../shortestpath/AStarAlgorithm.class | Bin 979 -> 5602 bytes .../shortestpath/DijkstraAlgorithm.class | Bin 5406 -> 5428 bytes .../org/insa/graphs/gui/simple/Launch.java | 141 ++++++++++++------ .../org/insa/graphs/gui/simple/Launch$1.class | Bin 1292 -> 1292 bytes .../org/insa/graphs/gui/simple/Launch.class | Bin 4691 -> 6740 bytes .../main/java/org/insa/graphs/model/Path.java | 2 - .../classes/org/insa/graphs/model/Path.class | Bin 6437 -> 6412 bytes 9 files changed, 114 insertions(+), 62 deletions(-) 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 f15c7a0..c659b75 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 @@ -16,10 +16,13 @@ public class AStarAlgorithm extends DijkstraAlgorithm { super(data); } + public LabelStar newLabelStar(Node s, ShortestPathData data){ + return new LabelStar(s, false, Integer.MAX_VALUE, null, s.getPoint().distanceTo(data.getDestination().getPoint())); + } + @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(); @@ -30,20 +33,19 @@ public class AStarAlgorithm extends DijkstraAlgorithm { BinaryHeap