public async Task <IActionResult> GetKruskal() { // var graph = Initializing.CreateGraph(@"../Graph/_Kruskal.txt"); var matrix = new int[8, 8] { { 0, 3, 0, 0, 0, 34, 0, 80 }, { 3, 0, 0, 1, 0, 0, 0, 68 }, { 0, 0, 0, 0, 23, 0, 12, 0 }, { 0, 1, 0, 0, 53, 0, 0, 39 }, { 0, 0, 23, 53, 0, 0, 68, 14 }, { 34, 0, 0, 0, 0, 0, 0, 25 }, { 0, 0, 12, 0, 68, 0, 0, 99 }, { 80, 68, 0, 39, 14, 25, 99, 0 }, }; var graph = Initializing.CreateGraph(matrix); var graphToReturn = KruskalAlgorithm.KruskalSolve(graph); List <Graph> listGraph = new List <Graph> { graph, graphToReturn }; return(Ok(listGraph)); }
public async Task <IActionResult> GetKruskal() { var graph = Initializing.CreateGraph(@"../Graph/_Kruskal.txt"); var graphToReturn = KruskalAlgorithm.KruskalSolve(graph); List <Graph> listGraph = new List <Graph> { graph, graphToReturn }; return(Ok(listGraph)); }