Example #1
0
        public void BFS_Test()
        {
            var graph = GraphSeeder.GetTestStructure();

            BFS bfs = new BFS();

            bfs.Search(graph);
        }
Example #2
0
        public void DFS_Test()
        {
            //Graph2 g = new Graph2(4);

            //g.AddEdge(0, 1);
            //g.AddEdge(0, 2);
            //g.AddEdge(1, 2);
            //g.AddEdge(2, 0);
            //g.AddEdge(2, 3);
            //g.AddEdge(3, 3);

            //Debug.WriteLine("Following is Breadth First Traversal " +
            //				   "(starting from vertex 2)");

            //g.BreadthFirstSearch(2);
            var graph = GraphSeeder.GetTestStructure();

            DFS bfs = new DFS();

            bfs.Search("People.aspx", graph);
        }