Exemple #1
0
 private void PostVisit(DataStructure.Graph.Simple2.Vertex v)
 {
     if (addtoStack)
     {
         stack.Push(v);
     }
 }
Exemple #2
0
 private void DFS(DataStructure.Graph.Simple2.Vertex v)
 {
     if (visited[v.Value])
     {
         return;
     }
     PreVisit(v);
     foreach (var w in v.Neighbours)
     {
         DFS(w);
     }
 }
Exemple #3
0
 private void PreVisit(DataStructure.Graph.Simple2.Vertex v)
 {
     visited[v.Value] = true;
     id[v.Value]      = count;
 }