Accord.Tests.Math.MatrixTest.ApplyTest2 C# (CSharp) Method

ApplyTest2() private method

private ApplyTest2 ( ) : void
return void
        public void ApplyTest2()
        {
            double[,] data =
            { 
                { 42, 1, -5 }, 
                { 42, 1, -5 }, 
            };

            Func<double, double> func = x => x - x;

            double[,] actual;
            double[,] expected =
            { 
                { 0, 0, 0 }, 
                { 0, 0, 0 }, 
            };

            actual = Matrix.Apply(data, func);
            Assert.IsTrue(expected.IsEqual(actual));
            Assert.AreNotEqual(actual, data);

            Matrix.ApplyInPlace(data, func);
            Assert.IsTrue(expected.IsEqual(data));
        }
MatrixTest