コード例 #1
0
        public static void Test_Array_List(int seed)
        {
            Stopwatch sw       = new Stopwatch();
            string    filename = @"mydataarray.dat";

            sw.Start();
            MyFileArray myarray = new MyFileArray(filename, n, seed);

            sw.Stop();

            Console.WriteLine("Size of {0} count was initialized in => {1}", n, sw.Elapsed);

            Console.WriteLine("\nHeapsort started (timer on) \n");

            sw.Start();

            List <SortableObject> array = BucketSort_D.BucketSort(myarray, n);

            Console.WriteLine("yikes");
            foreach (var item in array)
            {
                Console.WriteLine(item);
            }
            Console.WriteLine("yikes");


            sw.Stop();
            Console.WriteLine("Heap sort took => {0}", sw.Elapsed);
        }
コード例 #2
0
        public static void Test_Array_List(int seed, int n)
        {
            Stopwatch   sw       = new Stopwatch();
            string      filename = @"mydataarray.dat";
            MyFileArray myarray  = new MyFileArray(filename, n, seed);

            sw.Start();

            List <SortableObject> array = BucketSort_D.BucketSort(myarray, n);

            sw.Stop();
            Console.WriteLine("{1,9} took => {0}", sw.Elapsed, n);
        }