code: public static DoubleVector multiplyUnmodified(DoubleVector left,
                                                    DoubleVector right) {
          if (left.length() != right.length())
              throw new IllegalArgumentException(
                      "Vectors of different sizes cannot be multiplied");
          DoubleVector result;
          if (left instanceof SparseVector ||
              right instanceof SparseVector)
              result = new CompactSparseVector(left.length());
          else
              result = new DenseVector(left.length());
  
          int length = left.length();
          for (int i = 0; i < length; ++i)
              result.set(i, left.get(i) * right.get(i));
          return result;
      }
docs: Multiply the values in {@code left} and {@code right} and store the
  product in a new {@code Vector}.  This is an element by element
  multiplication.
  
  @param left The left {@code Vector} to multiply.
  @param right The right {@code Vector} to multiply.
  
  @return The product of {@code left} and {@code right}