Java Number Minus minusEquals(double[] w, double v)

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

Description

w[i] = w[i] - v

License

Open Source License

Parameter

Parameter Description
w a parameter
v a parameter

Declaration

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

Method Source Code

//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];
            }
        }
    }
}

Related

  1. minus(String second, String first)
  2. minus128(int v)
  3. minuscula(char c)
  4. minusculas(char c)
  5. minusDayOfWeek(int dow, long days)
  6. minusEquals(int[] vals, int min)
  7. minusEqualsInverse(double[] w, double[] v, double a)
  8. minusExact(final int a, final int b)
  9. minusExact(long a, long b)