示例#1
0
        public void AutoTest_ANDEquation_Once()
        {
            int[]       A         = Generate_RandomA();
            ANDEquation ANDEq_Obj = new ANDEquation();
            int         yResult   = ANDEq_Obj.restoreY(A);

            Console.WriteLine("Test_ANDEquation.AutoTest_ANDEquation_Once: A = >" + Stringify_A(A) + "<");
            Console.WriteLine("Test_ANDEquation.AutoTest_ANDEquation_Once: yResult = >" + yResult + "<");
            Console.WriteLine(""); Console.WriteLine("");
        }
示例#2
0
        public void SelManTest_ANDEquation_Multi()
        {
            ANDEquation ANDEq_Obj = new ANDEquation();

            int[]   A1    = { 1, 3, 5 };
            int[]   A2    = { 31, 7 };
            int[]   A3    = { 31, 7, 7 };
            int[]   A4    = { 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1 };
            int[]   A5    = { 191411, 256951, 191411, 191411, 191411, 256951, 195507, 191411, 192435, 191411, 191411, 195511, 191419, 191411, 256947, 191415, 191475, 195579, 191415, 191411, 191483, 191411, 191419, 191475, 256947, 191411, 191411, 191411, 191419, 256947, 191411, 191411, 191411 };
            int[]   A6    = { 1362, 1066, 1659, 2010, 1912, 1720, 1851, 1593, 1799, 1805, 1139, 1493, 1141, 1163, 1211 };
            int[]   A7    = { 2, 3, 7, 19 };
            int[][] AllAs = { A1, A2, A3, A4, A5, A6, A7 };

            for (int i = 0; i < AllAs.Count(); i++)
            {
                int yResult = ANDEq_Obj.restoreY(AllAs[i]);
                Console.WriteLine("Test_ANDEquation.SelManTest_ANDEquation_Multi: AllAs[" + i + "] = >" + Stringify_A(AllAs[i]) + "<");
                Console.WriteLine("Test_ANDEquation.SelManTest_ANDEquation_Multi: yResult1 = >" + yResult + "<");
            }
            Console.WriteLine(""); Console.WriteLine("");
        }