예제 #1
0
 public void Sort()
 {
     if (massives.Count > 1)
     {
         outputMass = RadixSort.Sort(massives.ToArray(), massives.Count, 10);
         UpdateOutList();
         MessageBox.Show("Сортування виконано", "Complete");
     }
 }
예제 #2
0
        public void Sort(ListBox inList, ListBox outList)
        {
            statistic   = new TimeSpan[10];
            outMassives = new List <uint[]>();
            GenerateMassives();
            for (int i = 0; i < 10; i++)
            {
                Stopwatch multiWatch = new Stopwatch();
                multiWatch.Start();
                outMassives.Add(RadixSort.Sort(massives[i], n[i], RadixSort.CountRoz(max[i])));
                multiWatch.Stop();
                statistic[i] = multiWatch.Elapsed;
            }

            CreateDataBefore();
            CreateDataAfter();

            PrintData(inList, inputData);
            PrintData(outList, outputData);

            MessageBox.Show("Сортування виконано", "Complete");
        }