public void RunScc(string path) { Digraph G = new Digraph(path); SCC scc = new KosarajuSCC(G); Bag <int>[] components = new Bag <int> [scc.Count()]; for (int i = 0; i < scc.Count(); i++) { components[i] = new Bag <int>(); } for (int i = 0; i < G.V(); i++) { components[scc.Id(i)].Add(i); } for (int i = 0; i < scc.Count(); i++) { Console.WriteLine(string.Join(",", components[i])); } }
public SCC(Digraph G) { }
public DirectedDFS(Digraph G, int s) : this(G, (IEnumerable <int>) new[] { s }) { }