diff options
author | Santo Cariotti <sancn@live.com> | 2017-04-26 16:37:39 +0200 |
---|---|---|
committer | Santo Cariotti <sancn@live.com> | 2017-04-26 16:37:39 +0200 |
commit | 483d63fa7249ad8d6020680c48c3cf6df35010b3 (patch) | |
tree | 2f8649e3ae6b42ace5011246285c9c450f004222 /DFS.cpp | |
parent | 6c957dc4e01aee6ce9cae3c8342d04b0fd9ca9c4 (diff) |
Moved all C++ files into CPP folder
Diffstat (limited to 'DFS.cpp')
-rw-r--r-- | DFS.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/DFS.cpp b/DFS.cpp deleted file mode 100644 index fda5a33..0000000 --- a/DFS.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include <iostream>
-#define BIANCO 0 //Non Visitato
-#define NERO 2 //Visitato
-#define GRIGIO 1 //Non Finito
-#define INF 999999
-#include <vector>
-#include <fstream>
-#include <queue>
-#define MAXN 9999
-#define INDEF -1
-#include <stack>
-using namespace std;
-int V=9;
-int matriceAdj[MAXN][MAXN];
- int colore[MAXN];
- //DFS Tramite matrice di adiacenza
- void dfsVisit (int u)
- {
- colore[u]= GRIGIO;
- for (int i=0;i<V;i++)
- {
- if (matriceAdj[u][i] == 1 && colore[i] == BIANCO )
- dfsVisit(i);
- }
- colore[u]= NERO;
- }
- // Le chiamate ricorsive sono quanti sono i nodi GRIGI
- int dfs()
- {
- for (int i=0;i<V;i++) colore[i]=BIANCO;
- for (int i=0;i<V;i++) if (colore[i]==BIANCO) dfsVisit(i);
- }
-
-int main(int argc, char** argv) {
-
- //Vanno settati i dati riguardanti gli archi esistenti
-
- return 0;
-}
|