code: public static double[] pairwiseMax (double[] vector1, double[] vector2) {
          // Initialize the return value:
          final double[] retval = new double[vector1.length];
  
          // Iterate over values and get maxs:
          for (int i = 0; i < retval.length; i++) {
              retval[i] = Math.max(vector1[i], vector2[i]);
          }
  
          // Done, return:
          return retval;
      }
docs: Computes a vector as the max of respective pairs from two arrays.
  
  @param vector1 The first vector.
  @param vector2 The second vector.
  @return Maxs of two vectors.