コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            double[] data = { 3, 9, 15, 7, 8, 4, 11 };
            QuickSortAlgo.Quicksort <double>(data, 0, data.Length - 1);
            string out1 = "";

            foreach (int n in data)
            {
                out1 += n.ToString() + " " + "\n";
            }
            MessageBox.Show(out1);
        }
コード例 #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            int size = 10000000;

            double[] data = new double[size];
            InitData(data);
            Stopwatch sw = new Stopwatch();

            sw.Start();
            QuickSortAlgo.QuickSortParallel <double>(data, 0, data.Length - 1);
            sw.Stop();
            MessageBox.Show("Parallel: Time taken = " + sw.ElapsedMilliseconds.ToString());
        }