public static double[] plusEquals(final double[] v1, final double[] v2) {
    assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
    for(int i = 0; i < v1.length; i++) {
      v1[i] += v2[i];
    }
    return v1;
  }
public static double [ ] plusEquals ( final double [ ] v1 , final double [ ] v2 ) { assert v1 . length == v2 . length : ERR_VEC_DIMENSIONS ; for ( int i = 0 ; i < v1 . length ; i ++ ) { v1 [ i ] += v2 [ i ] ; } return v1 ; }
Computes component-wise v1 = v1 + v2,
overwriting the vector v1.

@param v1 first vector (overwritten)
@param v2 second vector
@return v1 = v1 + v2