Пример #1
0
        public void ReTest()
        {
            Complex[] x        = { new Complex(1, 5), new Complex(2, -1), new Complex(-5, 1) };
            double[]  expected = { 1, 2, -5 };
            double[]  actual   = ComplexMatrix.Re(x);

            Assert.IsTrue(expected.IsEqual(actual));
        }
Пример #2
0
        public void MatrixReTest()
        {
            Complex[,] x =
            {
                { new Complex(1, 5), new Complex(2, 6) },
                { new Complex(3, 7), new Complex(4, 8) },
                { new Complex(5, 9), new Complex(6, 0) },
            };

            double[,] expected =
            {
                { 1, 2 },
                { 3, 4 },
                { 5, 6 },
            };

            double[,] actual = ComplexMatrix.Re(x);
            Assert.IsTrue(expected.IsEqual(actual));
        }