Example #1
0
 public TranstiveClosure(Graph G)
 {
     all = new GraphDFS[G.GetV()];
     for (int i = 0; i < G.GetV(); i++)
         all[i] = new GraphDFS(G, i);
 }
Example #2
0
 public TwoColor(Graph G)
     : base(G)
 {
     color = new bool[G.GetV()];
     for (int s = 0; s < G.GetV(); s++)
     {
         if (!marked[s])
         {
             Search(s);
         }
     }
 }
Example #3
0
        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);
        }
Example #4
0
        public GraphSearch(Graph _G)
        {
            G = _G;

            marked = new bool[G.GetV()];
            edgeTo = new int[G.GetV()];
        }
Example #5
0
        public GraphSearch(Graph _G, int _start)
        {
            G = _G;
            start = _start;

            marked = new bool[G.GetV()];
            edgeTo = new int[G.GetV()];

            Search(start);
        }
Example #6
0
 public GraphDFS(Graph _G, List<int> _source)
     : base(_G, _source)
 {
 }
Example #7
0
 public GraphDFS(Graph _G, int _start)
     : base(_G, _start)
 {
 }