Here you can find the source of minusEquals(double[] w, double v)
Parameter | Description |
---|---|
w | a parameter |
v | a parameter |
public static void minusEquals(double[] w, double v)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w .j a v a 2 s .co m * w[i] = w[i] - v * @param w * @param v */ public static void minusEquals(double[] w, double v) { for (int i = 0; i < w.length; i++) { w[i] -= w[i] + v; } } /** * w = w - a*v * @param w * @param v * @param a */ public static void minusEquals(double[] w, double[] v, double a) { for (int i = 0; i < w.length; i++) { w[i] -= a * v[i]; } } /** * v -= w * @param v * @param w */ public static void minusEquals(double[][] w, double[][] v) { for (int i = 0; i < w.length; i++) { for (int j = 0; j < w[0].length; j++) { w[i][j] -= v[i][j]; } } } /** * v[i][j] -= a*w[i][j] * @param v * @param w */ public static void minusEquals(double[][] w, double[][] v, double a) { for (int i = 0; i < w.length; i++) { for (int j = 0; j < w[0].length; j++) { w[i][j] -= a * v[i][j]; } } } }