code: public static Vector subtract(Vector vector1, Vector vector2) {
          if (vector2.length() != vector1.length())
              throw new IllegalArgumentException(
                      "Vectors of different sizes cannot be added");
          if (vector2 instanceof IntegerVector &&
              vector1 instanceof DoubleVector)
              return subtract(vector1, Vectors.asDouble(vector2));
          if (vector2 instanceof SparseVector)
              subtractSparseValues(vector1, vector2);
          else {
              for (int i = 0; i < vector2.length(); ++i) {
                  double value = vector1.getValue(i).doubleValue() -
                                 vector2.getValue(i).doubleValue();
                  vector1.set(i, value);
              }
          }
  
          return vector1;
      }
docs: Subtracts the second {@code Vector} fromt the first {@code Vector} and
  returns the result.
  
  @param vector1 The destination vector to be subtracted from.
  @param vector2 The source vector to subtract.
  @return The subtraction of {code vector2} from {@code vector1}.