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

            marked = new bool[G.GetV()];
            edgeTo = new int[G.GetV()];
        }
예제 #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);
     }
 }
예제 #3
0
        public GraphSearch(Graph _G, int _start)
        {
            G     = _G;
            start = _start;

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

            Search(start);
        }
예제 #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);
         }
     }
 }
예제 #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);
                }
            }
        }
예제 #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);
         }
     }
 }
예제 #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);
 }
예제 #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);
        }
예제 #9
0
        public GraphSearch(Graph _G)
        {
            G = _G;

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

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

            Search(start);
        }