Exemple #1
0
        public void BaseMatrix_SymmetricMatrix()
        {
            int[][] m = new int[][]
            {
                new int[] { 1, 0, 2 },
                new int[] { 0, 1, 0 },
                new int[] { 2, 0, 1 },
            };

            BaseMatrix <int> matrix1 = BaseMatrix <int> .CreateMatrix(m);

            Assert.AreEqual(typeof(SymmetricMatrix <int>), matrix1.GetType());
        }
Exemple #2
0
        public void BaseMatrix_DiagonalMatrix()
        {
            int[][] m = new int[][]
            {
                new int[] { 1, 0, 0 },
                new int[] { 0, 1, 0 },
                new int[] { 0, 0, 1 },
            };

            BaseMatrix <int> matrix1 = BaseMatrix <int> .CreateMatrix(m);

            Assert.AreEqual(typeof(DiagonalMatrix <int>), matrix1.GetType());
        }
Exemple #3
0
        public void BaseMatrix_SimpleMatrix()
        {
            int[][] m = new int[][]
            {
                new int[] { 1, 0, 2 },
                new int[] { 1, 1, 0 },
                new int[] { 2, 0, 1 },
                new int[] { 14, 3, 2 }
            };

            BaseMatrix <int> matrix1 = BaseMatrix <int> .CreateMatrix(m);

            Assert.AreEqual(typeof(BaseMatrix <int>), matrix1.GetType());
        }