code: public static DoubleVector multiply(DoubleVector left, DoubleVector right) {
          if (left.length() != right.length())
              throw new IllegalArgumentException(
                      "Vectors of different sizes cannot be multiplied");
  
          if (left instanceof SparseVector && right instanceof SparseVector) {
              TIntSet lnz = new TIntHashSet(((SparseVector)left).getNonZeroIndices());
              for (int nz : ((SparseVector)right).getNonZeroIndices()) {
                  if (lnz.contains(nz)) {
                      left.set(nz, left.get(nz) * right.get(nz));
                      lnz.remove(nz);
                  }
              }
  
              // The remaining non-zero values in left should be zero'd out
              // because they were effectively multiplied by zero by the right
              // vector.
              TIntIterator iter = lnz.iterator();
              while (iter.hasNext())
                  left.set(iter.next(), 0);
          }
          else {
              int length = left.length();
              for (int i = 0; i < length; ++i)
                  left.set(i, left.get(i) * right.get(i));
          }
          return left;
      }
docs: Multiply the values in {@code left} and {@code right} and store the
  product in {@code left}.  This is an element by element multiplication.
  
  @param left The left {@code Vector} to multiply, and contain the result
  values.
  @param right The right {@code Vector} to multiply.
  
  @return The product of {@code left} and {@code right}