コード例 #1
0
ファイル: GraphBFS.cs プロジェクト: iChrisJ/Play-Graph
        public static void Main()
        {
            Graph    g   = new Graph("g3.txt");
            GraphBFS bfs = new GraphBFS(g);

            Console.WriteLine(bfs.Order);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: sarprk/DataStructures
        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();
        }