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

InsertRowTest5() private method

private InsertRowTest5 ( ) : void
return void
        public void InsertRowTest5()
        {
            double[][] a =
            { 
               new double[] { 100.00, 27.56, 33.89},
               new double[] { 27.56, 100.00, 24.76},
               new double[] { 33.89, 24.76, 100.00} 
             };

            Assert.AreEqual(3, a.Length);
            Assert.AreEqual(3, a[0].Length);

            double[][] b = a.InsertColumn(new double[] { 1, 2, 3, 100 });

            Assert.AreEqual(3, a.Length);
            Assert.AreEqual(3, a[0].Length);
            Assert.AreEqual(4, b.Length);
            Assert.AreEqual(4, b[0].Length);

            double[][] c = a.InsertRow(new double[] { 1, 2, 3, 100 });

            Assert.AreEqual(3, a.Length);
            Assert.AreEqual(3, a[0].Length);
            Assert.AreEqual(4, b.Length);
            Assert.AreEqual(4, b[0].Length);
            Assert.IsTrue(c.GetColumn(3).IsEqual(new[] { 0, 0, 0, 100 }));

            a = a.InsertColumn(new double[] { 1, 2, 3 })
                 .InsertRow(new double[] { 1, 2, 3, 100 });

            Assert.AreEqual(4, a.Length);
            Assert.AreEqual(4, a[0].Length);
            Assert.IsTrue(a.GetRow(3).IsEqual(new[] { 1, 2, 3, 100 }));
            Assert.IsTrue(a.GetColumn(3).IsEqual(new[] { 1, 2, 3, 100 }));
        }
MatrixTest