コード例 #1
0
        //---------------------------------------------------------------------------------------
        //Преобразвание значений матрицы
        public static RealMatrix TransformMatrixValues(RealMatrix matrix, LogTransform logTransform)
        {
            RealMatrix newMatrix = new RealMatrix(matrix.RowCount, matrix.ColumnCount);

            for (int row = 0; row < matrix.RowCount; row++)
            {
                for (int column = 0; column < matrix.ColumnCount; column++)
                {
                    double newValue = logTransform.GetLogTransform(matrix[row, column]);
                    newMatrix[row, column] = newValue;
                }
            }
            return(newMatrix);
        }
コード例 #2
0
        //---------------------------------------------------------------------------------------
        //Преобразвание значений матрицы
        public static IntegerMatrix TransformMatrixValues(IntegerMatrix matrix, LogTransform logTransform)
        {
            IntegerMatrix newMatrix = new IntegerMatrix(matrix.RowCount, matrix.ColumnCount);

            for (int row = 0; row < matrix.RowCount; row++)
            {
                for (int column = 0; column < matrix.ColumnCount; column++)
                {
                    double newValue = logTransform.GetLogTransform(matrix[row, column]);
                    newMatrix[row, column] = Convert.ToInt32(newValue);
                }
            }
            return(newMatrix);
        }