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

InsertRowTest() private method

private InsertRowTest ( ) : void
return void
        public void InsertRowTest()
        {
            double[,] I = Matrix.Identity(3);
            double[] row = Matrix.Vector(3, new[] { 1.0, 1.0, 1.0 });

            double[,] expected;
            double[,] actual;


            expected = new double[,]
            {
                { 1, 1, 1 },
                { 1, 0, 0 },
                { 0, 1, 0 },
                { 0, 0, 1 },
            };

            actual = Matrix.InsertRow(I, row, 0);
            Assert.IsTrue(actual.IsEqual(expected));


            expected = new double[,]
            {
                { 1, 0, 0 },
                { 1, 1, 1 },
                { 0, 1, 0 },
                { 0, 0, 1 },
            };

            actual = Matrix.InsertRow(I, row, 1);
            Assert.IsTrue(actual.IsEqual(expected));


            expected = new double[,]
            {
                { 1, 0, 0 },
                { 0, 1, 0 },
                { 1, 1, 1 },
                { 0, 0, 1 },
            };

            actual = Matrix.InsertRow(I, row, 2);
            Assert.IsTrue(actual.IsEqual(expected));


            expected = new double[,]
            {
                { 1, 0, 0 },
                { 0, 1, 0 },
                { 0, 0, 1 },
                { 1, 1, 1 },
            };

            actual = Matrix.InsertRow(I, row, 3);
            Assert.IsTrue(actual.IsEqual(expected));
        }
MatrixTest