changement du cout de label du format integer en double pour avoir les memes valeurs avec Bellman Ford et Dijkstra
このコミットが含まれているのは:
コミット
d78019f648
2個のファイルの変更、3行の追加、6行の削除
|
|
@ -2,10 +2,8 @@ package org.insa.graphs.algorithm.shortestpath;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.insa.graphs.algorithm.AbstractSolution;
|
import org.insa.graphs.algorithm.AbstractSolution;
|
||||||
import org.insa.graphs.algorithm.ArcInspector;
|
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.BinaryHeap;
|
||||||
import org.insa.graphs.algorithm.utils.ElementNotFoundException;
|
import org.insa.graphs.algorithm.utils.ElementNotFoundException;
|
||||||
import org.insa.graphs.model.Arc;
|
import org.insa.graphs.model.Arc;
|
||||||
|
|
@ -14,6 +12,7 @@ import org.insa.graphs.model.Node;
|
||||||
import org.insa.graphs.model.Path;
|
import org.insa.graphs.model.Path;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
||||||
|
|
||||||
public DijkstraAlgorithm(ShortestPathData data) {
|
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){
|
public Label (Node sommet_courant){
|
||||||
this.sommet_courant = sommet_courant;
|
this.sommet_courant = sommet_courant;
|
||||||
this.marque = false;
|
this.marque = false;
|
||||||
this.cout_realise = Integer.MAX_VALUE;
|
this.cout_realise = Double.POSITIVE_INFINITY;
|
||||||
this.arcpere_fils = null;
|
this.arcpere_fils = null;
|
||||||
}
|
}
|
||||||
//setter sommet courant
|
//setter sommet courant
|
||||||
|
|
|
||||||
読み込み中…
新しいイシューから参照