コード例 #1
0
        public void testInputTMatrix()
        {
            matrix = new TMatrix(matrix_col, matrix_row);

            matrix.InputMatrix(mass);

            Assert.AreEqual(mass, matrix.Mass);
        }
コード例 #2
0
        public void testSumTMatrix()
        {
            matrix = new TMatrix(matrix_col, matrix_row);
            var matrix2 = new TMatrix(matrix_col, matrix_row);

            matrix.InputMatrix(mass);

            matrix2.InputMatrix(mass);

            matrix.Sum(matrix2);

            Assert.AreEqual(new int[, ] {
                { 2, 2 }, { 4, 4 }, { 6, 6 }
            }, matrix.Mass);
        }