Esempio n. 1
0
 public Node(Node node)
 {
     Marked = node.Marked;
     F = node.F;
     L = node.L;
     Number = node.Number;
 }
Esempio n. 2
0
        public void DFS(ref Node s, ref int t, int i)
        {
            adjacency_list[i].Key.Marked = true;
            adjacency_list[i].Key.L = s;

            foreach (var item in adjacency_list[i].Value)
            {
                int index = adjacency_list.FindIndex(x => x.Key.Number == item);

                if (!adjacency_list[index].Key.Marked)
                    DFS(ref s, ref t, index);
            }
            t++;
            adjacency_list[i].Key.F = t;
        }