Here you can find the source of matrixScalarMultiplication(double[][] w, double v)
Parameter | Description |
---|---|
w | a parameter |
v | a parameter |
public static void matrixScalarMultiplication(double[][] w, double v)
//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; } } } }