public static void ShowCycle(this DiGraph dg) { DirectedCycle Cycle = new DirectedCycle(dg); if (Cycle.hasCycle()) { Console.Write("Directed Graph Cycled in : "); foreach (var e in Cycle.Cycle()) { Console.Write("{0} ", e); } Console.WriteLine(); } }
public static void ShowCycle(this DiGraph dg) { DirectedCycle Cycle = new DirectedCycle(dg); if (Cycle.hasCycle()) { Console.Write("Directed Graph Cycled in : "); foreach (var e in Cycle.Cycle()) { Console.Write("{0} ", e); } Console.WriteLine(); } }