Beispiel #1
0
        public mMatrix2D <T> Clone()
        {
            mMatrix2D <T> rets = new mMatrix2D <T>(capacity);

            for (byte i = 0; i < capacity; i++)
            {
                for (byte j = 0; j < capacity; j++)
                {
                    rets[i, j] = values[i, j];
                }
            }
            return(rets);
        }
Beispiel #2
0
        // Транспонирование матрицы.
        public mMatrix2D <T> Transpose()
        {
            mMatrix2D <T> matrix = new mMatrix2D <T>(capacity);

            for (int i = 0; i < capacity; i++)
            {
                matrix[i, i] = this[i, i];
            }
            for (int i = 0; i < capacity; i++)
            {
                for (int j = 0; j < i; j++)
                {
                    matrix[i, j] = this[j, i];
                    matrix[j, i] = this[i, j];
                }
            }
            return(matrix);
        }