code: public static double[] timesPlus(final double[] v1, final double s1, final double[] v2) {
      assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
      final double[] result = new double[v1.length];
      for(int i = 0; i < result.length; i++) {
        result[i] = v1[i] * s1 + v2[i];
      }
      return result;
    }
docs: Computes component-wise v1 * s1 + v2.
  
  @param v1 first vector
  @param s1 the scalar for v1
  @param v2 second vector
  @return the result of v1 * s1 + v2