changement du cout de label du format integer en double pour avoir les memes valeurs avec Bellman Ford et Dijkstra
This commit is contained in:
parent
a73f89d6db
commit
d78019f648
2 changed files with 3 additions and 6 deletions
|
@ -2,10 +2,8 @@ package org.insa.graphs.algorithm.shortestpath;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.insa.graphs.algorithm.AbstractSolution;
|
||||
import org.insa.graphs.algorithm.ArcInspector;
|
||||
import org.insa.graphs.algorithm.ArcInspectorFactory;
|
||||
import org.insa.graphs.algorithm.utils.BinaryHeap;
|
||||
import org.insa.graphs.algorithm.utils.ElementNotFoundException;
|
||||
import org.insa.graphs.model.Arc;
|
||||
|
@ -14,6 +12,7 @@ import org.insa.graphs.model.Node;
|
|||
import org.insa.graphs.model.Path;
|
||||
|
||||
|
||||
|
||||
public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
||||
|
||||
public DijkstraAlgorithm(ShortestPathData data) {
|
||||
|
@ -139,8 +138,6 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ public class Label implements Comparable<Label>{
|
|||
public Label (Node sommet_courant){
|
||||
this.sommet_courant = sommet_courant;
|
||||
this.marque = false;
|
||||
this.cout_realise = Integer.MAX_VALUE;
|
||||
this.cout_realise = Double.POSITIVE_INFINITY;
|
||||
this.arcpere_fils = null;
|
||||
}
|
||||
//setter sommet courant
|
||||
|
|
Loading…
Reference in a new issue