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