//--------------------------------------------------------------------------------------- //Преобразвание значений матрицы 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); }
//--------------------------------------------------------------------------------------- //Преобразвание значений матрицы 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); }