amélioriation du pseudo code Dijkstra
This commit is contained in:
parent
86140f4d3a
commit
cdf04ab7e7
1 changed files with 9 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
package org.insa.graphs.algorithm.shortestpath;
|
package org.insa.graphs.algorithm.shortestpath;
|
||||||
|
|
||||||
import java.util.org.insa.graphs.algorithm.shortestpath.labels;
|
import java.util.org.insa.graphs.algorithm.shortestpath.label;
|
||||||
|
|
||||||
|
|
||||||
public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
||||||
|
@ -28,9 +28,17 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
||||||
dans chaque node y'a la liste de succesor avec des arcs
|
dans chaque node y'a la liste de succesor avec des arcs
|
||||||
dans les arcs on peut avoir la destination
|
dans les arcs on peut avoir la destination
|
||||||
|
|
||||||
|
dans BinaryHeap on a deletemin qu'on fera à chaque itération de dijkstra pour enlever du tas le sommet avec la plus petite distance de l'origine
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Graph graphe = data.getGraph();
|
||||||
|
Node nodeOriginel=data.getOrigin();
|
||||||
|
Node nodeDestination=data.getDestination();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// when the algorithm terminates, return the solution that has been found
|
// when the algorithm terminates, return the solution that has been found
|
||||||
return solution;
|
return solution;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue