Exemplo n.º 1
0
 private void PostVisit(DataStructure.Graph.Simple2.Vertex v)
 {
     if (addtoStack)
     {
         stack.Push(v);
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 3
0
 private void PreVisit(DataStructure.Graph.Simple2.Vertex v)
 {
     visited[v.Value] = true;
     id[v.Value]      = count;
 }