Java Matrix matrixDestructAdd(double[][] m1, double[][] m2)

Here you can find the source of matrixDestructAdd(double[][] m1, double[][] m2)

Description

matrix Destruct Add

License

Open Source License

Declaration

public static void matrixDestructAdd(double[][] m1, double[][] m2) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static void matrixDestructAdd(double[][] m1, double[][] m2) {
        assert (m1.length == m2.length);
        assert (m1[0].length == m2[0].length);

        for (int i = 0; i < m1.length; i++)
            for (int j = 0; j < m1[0].length; j++)
                m1[i][j] = m1[i][j] + m2[i][j];
    }/* ww w  .j  av a  2 s .  c  om*/
}

Related

  1. matrix_x_vectorMatrix(double[][] mat, double[][] vector, int vectorCol)
  2. matrixAbsDiff(double m1[][], double m2[][])
  3. matrixATrans_x_matrixB(double[][] matA, double[][] matB)
  4. matrixConcatLR(double[][] LMatrix, double[][] RMatrix)
  5. matrixConcatUL(double[][] UMatrix, double[][] LMatrix)
  6. matrixDeterminant(final float[] m, final int m_offset)
  7. matrixEquals(int[][] firstMatrix, int[][] secondMatrix)
  8. matrixIsWellformed(int numLabels, int[][] matrix)
  9. matrixKLDivergence(double m1[][], double m2[][])