public TransitiveClosure(Digraph g) { all = new DirectedDFS[g.Vertice()]; for (int i = 0; i < g.Vertice(); i++) { all[i] = new DirectedDFS(g, i); } }
public DirectedCycle(Digraph g) { _onList = new bool[g.Vertice()]; _marked = new bool[g.Vertice()]; _edgeTo = new int[g.Vertice()]; for (int i = 0; i < g.Vertice(); i++) { if (!_marked[i]) { Search(g, i); } } }
public DirectedDFS(Digraph g, List <int> l) { _marks = new bool[g.Vertice()]; foreach (var temp in l) { if (!_marks[temp]) { Search(g, temp); } } }
public DirectedDFS(Digraph g, int s) { _marks = new bool[g.Vertice()]; Search(g, s); }