Java Array arrayMinus(double[] w, double[] v)

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

Description

array Minus

License

Open Source License

Declaration

public static double[] arrayMinus(double[] w, double[] v) 

Method Source Code

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

public class Main {
    public static double[] arrayMinus(double[] w, double[] v) {
        double result[] = w.clone();
        for (int i = 0; i < w.length; i++) {
            result[i] -= v[i];//from ww w  .ja  v a2s. com
        }
        return result;
    }

    public static double[] arrayMinus(double[] result, double[] w, double[] v) {
        for (int i = 0; i < w.length; i++) {
            result[i] = w[i] - v[i];
        }
        return result;
    }
}

Related

  1. arrayFlatten(final int[][] arr)
  2. arrayGetCenter(byte[] array, int location, int length)
  3. arrayIsHave(String[] strs, String str)
  4. arrayLookup(int[] ar, int keystart, int keyend, int forbidden)
  5. arrayMember(String[] array, String member)
  6. arrayNotEmpty(T[] objects, String message)
  7. arrayOfClassType(T... array)
  8. arrayOffloatAsCSStrings(float[] ar)
  9. arrayOffloatCoordsAsCSStrings(float[] ar)