Example #1
0
        public void entry()
        {
            int num_nodes = 500;
            bool isGraphConnected;
            GraphImpl gi = new GraphImpl(num_nodes);
            gi.CreateNodes(gi.GetTotalNodes());
            gi.CreateEdges(gi.GetTotalNodes());
            //gi.display_connections();
            isGraphConnected = gi.isGraphConnected();

            if (!isGraphConnected)
            {
                Console.WriteLine("Graph not connected");
            }
            else
            {
                Console.WriteLine("Graph connected");

                Dijkstra dij = new Dijkstra();
                dij.DikkstraImpl(gi, 0, 8);
            }
        }
Example #2
0
        public void entry()
        {
            int       num_nodes = 500;
            bool      isGraphConnected;
            GraphImpl gi = new GraphImpl(num_nodes);

            gi.CreateNodes(gi.GetTotalNodes());
            gi.CreateEdges(gi.GetTotalNodes());
            //gi.display_connections();
            isGraphConnected = gi.isGraphConnected();

            if (!isGraphConnected)
            {
                Console.WriteLine("Graph not connected");
            }
            else
            {
                Console.WriteLine("Graph connected");

                Dijkstra dij = new Dijkstra();
                dij.DikkstraImpl(gi, 0, 8);
            }
        }