code: public static Vector copyOf(Vector source) {
          if (source instanceof DoubleVector)
              return copyOf((DoubleVector) source);
          if (source instanceof IntegerVector)
              return copyOf((IntegerVector) source);
  
          Vector result = new DenseVector(source.length());
          for (int i = 0; i < source.length(); ++i) 
              result.set(i, source.getValue(i));
          return result;
      }
docs: Creates a copy of a given {@code Vector}.
  
  @param source The {@code Vector} to copy.
  
  @return A copy of {@code source} with the same type.