Example #1
0
        public void autoRegulateSpecificTests()
        {
            ATaleOfThreeCities ATaleOfThreeCities_Obj = new ATaleOfThreeCities();
            double             minimal_added_distance = 0;

            // Test=1
            if (TC_GlobalConfig.b_verbose_TDS)
            {
                Console.WriteLine("ATaleOfThreeCities_Test.autoRegulateSpecificTests: Conducting Specific-Test#1 (see ProbStmt)");
            }
            int[] ax1 = { 0, 0, 0 }; int[] ay1 = { 0, 1, 2 };
            int[] bx1 = { 2, 3 }; int[] by1 = { 1, 1 };
            int[] cx1 = { 1, 5 }; int[] cy1 = { 3, 28 };
            minimal_added_distance = ATaleOfThreeCities_Obj.connect(ax1, ay1, bx1, by1, cx1, cy1);
            if (TC_GlobalConfig.b_verbose_TDS)
            {
                Console.WriteLine("ATaleOfThreeCities_Test.autoRegulateSpecificTests: minimal_added_distance = " + minimal_added_distance);
                Console.WriteLine("");
            }

            // Test=2
            if (TC_GlobalConfig.b_verbose_TDS)
            {
                Console.WriteLine("ATaleOfThreeCities_Test.autoRegulateSpecificTests: Conducting Specific-Test#2 (see ProbStmt)");
            }
            int[] ax2 = { -2, -1, 0, 1, 2 }; int[] ay2 = { 0, 0, 0, 0, 0 };
            int[] bx2 = { -2, -1, 0, 1, 2 }; int[] by2 = { 1, 1, 1, 1, 1 };
            int[] cx2 = { -2, -1, 0, 1, 2 }; int[] cy2 = { 2, 2, 2, 2, 2 };
            minimal_added_distance = ATaleOfThreeCities_Obj.connect(ax2, ay2, bx2, by2, cx2, cy2);
            if (TC_GlobalConfig.b_verbose_TDS)
            {
                Console.WriteLine("ATaleOfThreeCities_Test.autoRegulateSpecificTests: minimal_added_distance = " + minimal_added_distance);
                Console.WriteLine("");
            }

            // Test=3
            if (TC_GlobalConfig.b_verbose_TDS)
            {
                Console.WriteLine("ATaleOfThreeCities_Test.autoRegulateSpecificTests: Conducting Specific-Test#3 (see ProbStmt)");
            }
            int[] ax3 = { 4, 5, 11, 21, 8, 10, 3, 9, 5, 6 }; int[] ay3 = { 12, 8, 9, 12, 2, 3, 5, 7, 10, 13 };
            int[] bx3 = { 34, 35, 36, 41, 32, 39, 41, 37, 39, 50 }; int[] by3 = { 51, 33, 41, 45, 48, 22, 33, 51, 41, 40 };
            int[] cx3 = { 86, 75, 78, 81, 89, 77, 83, 88, 99, 77 }; int[] cy3 = { 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
            minimal_added_distance = ATaleOfThreeCities_Obj.connect(ax3, ay3, bx3, by3, cx3, cy3);
            if (TC_GlobalConfig.b_verbose_TDS)
            {
                Console.WriteLine("ATaleOfThreeCities_Test.autoRegulateSpecificTests: minimal_added_distance = " + minimal_added_distance);
                Console.WriteLine("");
            }
        }
Example #2
0
        public void autoRegulateSingleRandomTest()
        {
            this.generateRandData();
            ATaleOfThreeCities ATaleOfThreeCities_Obj = new ATaleOfThreeCities();
            double             minimal_added_distance = ATaleOfThreeCities_Obj.connect(ax, ay, bx, by, cx, cy);

            if (TC_GlobalConfig.b_verbose_TDS)
            {
                Console.WriteLine("ATaleOfThreeCities_Test.autoRegulateSingleRandomTest: minimal_added_distance = " + minimal_added_distance);
                Console.WriteLine("");
            }
        }