From 410f1c9a6ea44f5a2c95ca35941ef4e5503a71da Mon Sep 17 00:00:00 2001 From: pfaure Date: Tue, 28 Apr 2020 09:53:55 +0200 Subject: [PATCH] =?UTF-8?q?Version=20Fonctionnelle=20:=20A*=20impl=C3=A9me?= =?UTF-8?q?nt=C3=A9=20(copie=20du=20code=20de=20Dijkstra)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shortestpath/AStarAlgorithm.java | 152 ++++++++++++++++++ .../graphs/algorithm/shortestpath/Label.java | 19 ++- .../algorithm/shortestpath/LabelStar.java | 22 +++ 3 files changed, 191 insertions(+), 2 deletions(-) create mode 100644 be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/LabelStar.java 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..3bb2992 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,161 @@ package org.insa.graphs.algorithm.shortestpath; +import org.insa.graphs.model.*; + +import java.util.ArrayList; +import java.util.Collections; + +import org.insa.graphs.algorithm.AbstractInputData.Mode; +import org.insa.graphs.algorithm.AbstractSolution.Status; +import org.insa.graphs.algorithm.utils.*; + public class AStarAlgorithm extends DijkstraAlgorithm { public AStarAlgorithm(ShortestPathData data) { super(data); } + @Override + protected ShortestPathSolution doRun() { + + BinaryHeap