Skip to content
Snippets Groups Projects
Commit aec8cf2f authored by Gianluca's avatar Gianluca
Browse files

Ricerca cammino migliore rotto

parent 9dff0a73
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
...@@ -165,6 +165,8 @@ public class BFS { ...@@ -165,6 +165,8 @@ public class BFS {
//Proviamo con la ricorsione //Proviamo con la ricorsione
//Implementazione sbagliata, ma l'idea credo sia giusta
GraphInterface bfsAlbero = bfsTree(sorgente); GraphInterface bfsAlbero = bfsTree(sorgente);
boolean[] founded = new boolean[this.myGraph.getOrder()]; boolean[] founded = new boolean[this.myGraph.getOrder()];
ArrayList<Integer> returnArray = new ArrayList<>(); ArrayList<Integer> returnArray = new ArrayList<>();
......
...@@ -7,7 +7,7 @@ public class Main { ...@@ -7,7 +7,7 @@ public class Main {
public static void main(String[] args) { public static void main(String[] args) {
Graph mioGrafo = new UndirectedGraph("7; 0 4; 4 3; 1 3; 1 2; 0 2; 0 5; 5 2"); //Num Nodi + Archi Graph mioGrafo = new UndirectedGraph("7; 0 4; 4 3; 1 3; 1 2; 0 2; 0 5; 5 2"); //Num Nodi + Archi
BFS mioBFS = new BFS(mioGrafo); BFS mioBFS = new BFS(mioGrafo);
int source = 4; int source = 0;
int destination = 3; int destination = 3;
System.out.println(">>> Sorgente delle Operazione: " + source); System.out.println(">>> Sorgente delle Operazione: " + source);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment