public GraphSearch(Graph _G) { G = _G; marked = new bool[G.GetV()]; edgeTo = new int[G.GetV()]; }
public TranstiveClosure(Graph G) { all = new GraphDFS[G.GetV()]; for (int i = 0; i < G.GetV(); i++) { all[i] = new GraphDFS(G, i); } }
public GraphSearch(Graph _G, int _start) { G = _G; start = _start; marked = new bool[G.GetV()]; edgeTo = new int[G.GetV()]; Search(start); }
public TwoColor(Graph G) : base(G) { color = new bool[G.GetV()]; for (int s = 0; s < G.GetV(); s++) { if (!marked[s]) { Search(s); } } }
public GraphSearch(Graph _G, List <int> sources) { G = _G; marked = new bool[G.GetV()]; edgeTo = new int[G.GetV()]; foreach (int s in sources) { if (!marked[s]) { Search(s); } } }
public TranstiveClosure(Graph G) { all = new GraphDFS[G.GetV()]; for (int i = 0; i < G.GetV(); i++) all[i] = new GraphDFS(G, i); }
public GraphSearch(Graph _G, List<int> sources) { G = _G; marked = new bool[G.GetV()]; edgeTo = new int[G.GetV()]; foreach (int s in sources) if (!marked[s]) Search(s); }