Beispiel #1
0
        public GraphSearch(Graph _G)
        {
            G = _G;

            marked = new bool[G.GetV()];
            edgeTo = new int[G.GetV()];
        }
Beispiel #2
0
 public TranstiveClosure(Graph G)
 {
     all = new GraphDFS[G.GetV()];
     for (int i = 0; i < G.GetV(); i++)
     {
         all[i] = new GraphDFS(G, i);
     }
 }
Beispiel #3
0
        public GraphSearch(Graph _G, int _start)
        {
            G     = _G;
            start = _start;

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

            Search(start);
        }
Beispiel #4
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);
         }
     }
 }
Beispiel #5
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);
                }
            }
        }
Beispiel #6
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);
         }
     }
 }
Beispiel #7
0
 public TranstiveClosure(Graph G)
 {
     all = new GraphDFS[G.GetV()];
     for (int i = 0; i < G.GetV(); i++)
         all[i] = new GraphDFS(G, i);
 }
Beispiel #8
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);
        }
Beispiel #9
0
        public GraphSearch(Graph _G)
        {
            G = _G;

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

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

            Search(start);
        }