Esempio n. 1
0
        public Topological(DirectGraph G)
        {
            DirectCycle cycle = new DirectCycle(G);

            if (!cycle.hasCycle())
            {
                DFSOrder dfsOrder = new DFSOrder(G);
                order = dfsOrder.ReversePost;
            }
        }
Esempio n. 2
0
 public Topological(DirectGraph G)
 {
     DirectCycle cycle = new DirectCycle(G);
     if (!cycle.hasCycle())
     {
         DFSOrder dfsOrder = new DFSOrder(G);
         order = dfsOrder.ReversePost;
     }
 }