Java Matrix matrixModule(double[][] matrix, int module)

Here you can find the source of matrixModule(double[][] matrix, int module)

Description

matrix Module

License

Creative Commons License

Declaration

public static double[][] matrixModule(double[][] matrix, int module) 

Method Source Code

//package com.java2s;
/*//from  w ww.  j  av  a  2  s. c o  m
 * Universidad Nacional de Colombia - Sede Bogot? *
 *
 *      Christian Rodriguez - carodriguezb@unal.edu.co
 *
 * C?digo liberado bajo licencia Creative Commons 3.0
 * http://creativecommons.org/licenses/by-nc-sa/3.0/
*/

public class Main {
    public static double[][] matrixModule(double[][] matrix, int module) {
        for (int x = 0; x < matrix.length; x++) {
            for (int y = 0; y < matrix[0].length; y++) {
                matrix[x][y] = matrix[x][y] % 256;
            }
        }
        return matrix;
    }
}

Related

  1. matrixDestructAdd(double[][] m1, double[][] m2)
  2. matrixDeterminant(final float[] m, final int m_offset)
  3. matrixEquals(int[][] firstMatrix, int[][] secondMatrix)
  4. matrixIsWellformed(int numLabels, int[][] matrix)
  5. matrixKLDivergence(double m1[][], double m2[][])
  6. matrixTimesVector(double[][] matrix, double[] vector)