Exemplo n.º 1
0
        private static void IterativeCheck()
        {
            BinarySearch_Iterative bs = new BinarySearch_Iterative();

            bs.BinarySearch_Check();

            BinarySearch_Iterative_ctrl_flow bs_ctrl = new BinarySearch_Iterative_ctrl_flow();

            bs_ctrl.BinarySearch_Check();

            //BinarySearch_Iterative_method bs_method = new BinarySearch_Iterative_method();
            //bs_method.BinarySearch_Check();

            //            BinarySearch_Iterative_method_default bs_method_default = new BinarySearch_Iterative_method_default();
            //            bs_method_default.BinarySearch_Check();
            //
            //
            BinarySearch_Iterative_method_modified bs_method_modified = new BinarySearch_Iterative_method_modified();

            bs_method_modified.BinarySearch_Check();

            //
            //            BinarySearch_Iterative_class bs_class = new BinarySearch_Iterative_class();
            //            bs_class.BinarySearch_Check();
            //
            //
            //            BinarySearch_Iterative_class_default bs_class_default = new BinarySearch_Iterative_class_default();
            //            bs_class_default.BinarySearch_Check();
        }
Exemplo n.º 2
0
        public static void RunTests()
        {
            BinarySearch_Iterative bs = new BinarySearch_Iterative();

            time_warmup.Clear();
            time_run.Clear();

            bs.Profile();


//            bs.BinarySearch_Check();
        }
Exemplo n.º 3
0
        private static void BinarySearch_ITERATIVE(List <int> data, List <int> keys)
        {
            BinarySearch_Iterative.testData       = data;
            BinarySearch_Iterative.keys           = keys;
            BinarySearch_Iterative.ITERATIONS     = ITERATIONS;
            BinarySearch_Iterative.WARMUP         = WARMUP;
            BinarySearch_Iterative.NUMBER_OF_RUNS = RUNS;
            BinarySearch_Iterative.RunTests();


            BinarySearch_Iterative_ctrl_flow.testData       = data;
            BinarySearch_Iterative_ctrl_flow.keys           = keys;
            BinarySearch_Iterative_ctrl_flow.ITERATIONS     = ITERATIONS;
            BinarySearch_Iterative_ctrl_flow.WARMUP         = WARMUP;
            BinarySearch_Iterative_ctrl_flow.NUMBER_OF_RUNS = RUNS;
            BinarySearch_Iterative_ctrl_flow.RunTests();

            //BinarySearch_Iterative_method.testData = data;
            //BinarySearch_Iterative_method.keys = keys;
            //BinarySearch_Iterative_method.ITERATIONS = ITERATIONS;
            //BinarySearch_Iterative_method.WARMUP = WARMUP;
            //BinarySearch_Iterative_method.NUMBER_OF_RUNS = RUNS;
            //BinarySearch_Iterative_method.RunTests();

            //BinarySearch_Iterative_method_default.testData = data;
            //BinarySearch_Iterative_method_default.keys = keys;
            //BinarySearch_Iterative_method_default.ITERATIONS = ITERATIONS;
            //BinarySearch_Iterative_method_default.WARMUP = WARMUP;
            //BinarySearch_Iterative_method_default.NUMBER_OF_RUNS = RUNS;
            //BinarySearch_Iterative_method_default.RunTests();

            BinarySearch_Iterative_method_modified.testData       = data;
            BinarySearch_Iterative_method_modified.keys           = keys;
            BinarySearch_Iterative_method_modified.ITERATIONS     = ITERATIONS;
            BinarySearch_Iterative_method_modified.WARMUP         = WARMUP;
            BinarySearch_Iterative_method_modified.NUMBER_OF_RUNS = RUNS;
            BinarySearch_Iterative_method_modified.RunTests();

            //BinarySearch_Iterative_class.testData = data;
            //BinarySearch_Iterative_class.keys = keys;
            //BinarySearch_Iterative_class.ITERATIONS = ITERATIONS;
            //BinarySearch_Iterative_class.WARMUP = WARMUP;
            //BinarySearch_Iterative_class.NUMBER_OF_RUNS = RUNS;
            //BinarySearch_Iterative_class.RunTests();

            //BinarySearch_Iterative_class_default.testData = data;
            //BinarySearch_Iterative_class_default.keys = keys;
            //BinarySearch_Iterative_class_default.ITERATIONS = ITERATIONS;
            //BinarySearch_Iterative_class_default.WARMUP = WARMUP;
            //BinarySearch_Iterative_class_default.NUMBER_OF_RUNS = RUNS;
            //BinarySearch_Iterative_class_default.RunTests();
        }