Example #1
0
        public static void Main()
        {
            Graph    g   = new Graph("g3.txt");
            GraphBFS bfs = new GraphBFS(g);

            Console.WriteLine(bfs.Order);
        }
Example #2
0
        static void Main(string[] args)
        {
            GraphBFS graph = new GraphBFS(4);

            graph.AddEdge(0, 1, true);
            graph.AddEdge(0, 2, true);

            graph.AddEdge(1, 2, true);

            graph.AddEdge(2, 0, true);
            graph.AddEdge(2, 3, true);

            graph.AddEdge(3, 3, true);
            graph.PrintGraph(2);
            ReadLine();
        }