示例#1
0
        public static void test_is_almost_symmetric()
        {
            Console.WriteLine("\nTesting is_almost_symmetric() ...\n");
            Numeric n = new Numeric();

            Matrix A = Matrix.from_list(new List<double[]>() { new double[] { 1, 7, 3 }, new double[] { 7, 4, -5 }, new double[] { 3, -5, 6 } });
            Console.WriteLine("\n\tA: " + A.ToString());
            Console.WriteLine("\n\t\tA is_almost_symmetric (expect success): " + n.is_almost_symmetric(A));

            Matrix B = Matrix.from_list(new List<double[]>() { new double[] { 1, 2 }, new double[] { 3, 4 } });
            Console.WriteLine("\n\tB: " + B.ToString());
            Console.WriteLine("\n\t\tB is_almost_symmetric (expect fail): " + n.is_almost_symmetric(B));
        }