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); }
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); }
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(); }
private static void DemoTopologySorting() { graphWithAdjList = new GraphWithAdjacencyList(); graphWithAdjList.GetTopologicalSort(); }
private static void DemoMSTByPrimAlg() { graphWithAdjList = new GraphWithAdjacencyList(); graphWithAdjList.GetMSTByPrimAlg(); }
private static void CreateGraphWithAdjListFromFile() { graphWithAdjList = new GraphWithAdjacencyList(); }