示例#1
0
        private void Job(int[][] dataSet, int k)
        {
            var tree = new HashTree(_maxSize);

            var stopWatch = new Stopwatch();

            for (int i = 0; i < dataSet.Length; i++)
            {
                if (i % K != k)
                {
                    continue;
                }

                stopWatch.Start();
                tree.Add(dataSet[i]);
                stopWatch.Stop();
                Print(i + 1, dataSet.Length, dataSet[i].Length, stopWatch.Elapsed.TotalSeconds);
                stopWatch.Restart();
            }

            _forest[k] = tree;

            tree.Save($"hash-{_maxSize}-{k}.tree");
        }