public static void Test_OP(int seed) { Console.WriteLine("---------------------------------------------"); Console.WriteLine("Test OP"); Stopwatch sw = new Stopwatch(); sw.Start(); MyDataArray myarray = new MyDataArray(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(); myarray.Print(n); Heapsort_OP.HeapSort(myarray, n); myarray.Print(n); sw.Stop(); Console.WriteLine("Test OP success "); Console.WriteLine("Size of {0} count array was sorted in => {1}", n, sw.Elapsed); Console.WriteLine("---------------------------------------------"); }
public static void Test_OP(int seed, int n) { Stopwatch sw = new Stopwatch(); MyDataArray myarray = new MyDataArray(n, seed); sw.Start(); Heapsort_OP.HeapSort(myarray, n); sw.Stop(); Console.WriteLine("{1,9} took => {0}", sw.Elapsed, n); }