예제 #1
0
        private static void DemoDijkstraAlg()
        {
            graphWithAdjList = new GraphWithAdjacencyList();
            Console.WriteLine("Enter the Node to start with");
            char input = Console.ReadLine().Trim().ToUpper()[0];

            graphWithAdjList.GetDjikstraAlgResultOn(input);
        }
예제 #2
0
        private static void DemoDepthFirstSearch()
        {
            graphWithAdjList = new GraphWithAdjacencyList();
            Console.WriteLine("Enter the node from which to start with");
            string input = Console.ReadLine();
            int    index = input.ToUpper()[0] - 'A';

            graphWithAdjList.DepthFirstSearch(index);
        }
예제 #3
0
        private static void CreateGraphWithAdjList()
        {
            Console.WriteLine("Please enter the number of nodes present in the Graph");
            int totalNumOfNodes = Convert.ToInt32(Console.ReadLine());

            graphWithAdjList = new GraphWithAdjacencyList(totalNumOfNodes);

            graphWithAdjList.InsertNodesWithNeighboursInfo();
            Console.WriteLine("All neighbouring nodes have been inserted");
            Console.ReadKey();
        }
예제 #4
0
        private static void DemoTopologySorting()
        {
            graphWithAdjList = new GraphWithAdjacencyList();

            graphWithAdjList.GetTopologicalSort();
        }
예제 #5
0
 private static void DemoMSTByPrimAlg()
 {
     graphWithAdjList = new GraphWithAdjacencyList();
     graphWithAdjList.GetMSTByPrimAlg();
 }
예제 #6
0
 private static void CreateGraphWithAdjListFromFile()
 {
     graphWithAdjList = new GraphWithAdjacencyList();
 }