From 5cacdd1e166950993f671f683cd66ea72852b6ad Mon Sep 17 00:00:00 2001 From: Kuzivanov Sergey <43182277+SergeyKuz1001@users.noreply.github.com> Date: Sun, 8 Dec 2019 12:05:03 +0300 Subject: [PATCH] Update ParallelAlgoKruskal.cs --- Task02/ParallelAlgoKruskal.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Task02/ParallelAlgoKruskal.cs b/Task02/ParallelAlgoKruskal.cs index 991f792..998ff74 100644 --- a/Task02/ParallelAlgoKruskal.cs +++ b/Task02/ParallelAlgoKruskal.cs @@ -73,13 +73,13 @@ static void parallelSort(T[] edges, T[] buffer, int LIndex, int RIndex, int p edges[k] = buffer[k]; } - public static int Execute() + public static int Execute(Graph graph) { int ans = 0; - (int, int, int)[] edges = GeneralResources.graphListEdges; + (int, int, int)[] edges = graph.graphListEdges; parallelSort(edges, new (int, int, int)[edges.Length], 0, edges.Length, parallelDepth); - dsu = new int[GeneralResources.n]; + dsu = new int[graph.graphAmountVertexes]; Array.Fill(dsu, -1); for (int i = 0; i < edges.Length; i++)