code: public static double[] overwriteTimes(final double[] v1, final double[] v2, final double s) {
      for(int i = 0; i < v1.length; i++) {
        v1[i] = v2[i] * s;
      }
      return v1;
    }
docs: Multiply component-wise v1 = v2 * s,
  overwriting the vector v1.
  
  @param v1 output vector
  @param v2 input vector
  @param s scalar
  @return v1 with new values