Beispiel #1
0
        public void NormalMultiplyWithIdentityMatrix()
        {
            Matrix a = new Matrix(new double[, ]
            {
                { 1, 2, 3 },
                { 4, 5, 6 },
                { 7, 8, 9 }
            });
            Matrix b        = MatrixGenerator.IdentityMatrix(3);
            Matrix expected = new Matrix(new double[, ]
            {
                { 1, 2, 3 },
                { 4, 5, 6 },
                { 7, 8, 9 }
            });
            Matrix actual = Matrix.NormalMultiply(a, b);

            Assert.AreEqual(expected, actual);
        }