Java Matrix Multiply matrixScalarMultiplication(double[][] w, double v)

Here you can find the source of matrixScalarMultiplication(double[][] w, double v)

Description

w = w.*v

License

Open Source License

Parameter

Parameter Description
w a parameter
v a parameter

Declaration

public static void matrixScalarMultiplication(double[][] w, double v) 

Method Source Code

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

public class Main {
    /**/*  w  w w  .  j  a v  a 2  s .  c  om*/
     * w = w.*v
     * @param w
     * @param v
     */
    public static void matrixScalarMultiplication(double[][] w, double v) {
        int w1 = w.length;
        int w2 = w[0].length;
        for (int w_i1 = 0; w_i1 < w1; w_i1++) {
            for (int w_i2 = 0; w_i2 < w2; w_i2++) {
                w[w_i1][w_i2] *= v;
            }
        }
    }
}

Related

  1. matrixMultiply(double[][] M, float[] V)
  2. matrixMultiply(double[][] M1, double[][] M2)
  3. matrixmultiply(final double[][] A, final double[] b)
  4. matrixMultiplyTwo(final double[][] first, final double[][] second)
  5. matrixMultiplyWithThreadOffset(double[] A, double[] Adiag, double[] B, int aHeight, int bWidth, int comm, int bz, int threadRowOffset, int rowOffset, double[] C)
  6. multiply(boolean[][] m1, boolean[][] m2)
  7. multiply(boolean[][] matrix, boolean[] vector)
  8. multiply(double[][] a, double[][] b)
  9. multiply(double[][] a, double[][] x)