public static void Test_D(int seed) { Console.WriteLine("---------------------------------------------"); Console.WriteLine("Test D"); Stopwatch sw = new Stopwatch(); string filename = @"/home/justin/Projects/HeapSort_OP/HeapSort_OP/mydataarray.dat"; sw.Start(); Console.WriteLine("Size of {0} count was initialized in => {1}", n, sw.Elapsed); MyFileArray myfilearray = new MyFileArray(filename, n, seed); sw.Stop(); sw.Start(); using (myfilearray.fs = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite)) { Console.WriteLine("\n FILE ARRAY \n"); myfilearray.Print(n); Heapsort_D.HeapSort(myfilearray, n); myfilearray.PrintFromFile(n); } sw.Stop(); Console.WriteLine("Test D success "); Console.WriteLine("Size of {0} count file was sorted in => {1}", n, sw.Elapsed); Console.WriteLine("---------------------------------------------"); }
public static void Test_D(int seed, int n) { Stopwatch sw = new Stopwatch(); string filename = @"/home/justin/Projects/HeapSort_OP/HeapSort_OP/mydataarray.dat"; MyFileArray myfilearray = new MyFileArray(filename, n, seed); sw.Start(); using (myfilearray.fs = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite)) { Heapsort_D.HeapSort(myfilearray, n); } sw.Stop(); Console.WriteLine("{1,9} took => {0}", sw.Elapsed, n); }