code: public static double dotProduct(Vector x, Vector y) {
          // If both of the vectors are integer vectors, cast and special case
          if (x instanceof IntegerVector && y instanceof IntegerVector)
              return dotProduct((IntegerVector)x, (IntegerVector)y);
          // Otherwise, just make both vectors double vectors and compute the dot
          // product regardless of their internal data type.
          else 
              return dotProduct(Vectors.asDouble(x), Vectors.asDouble(y));
      }
docs: Computes the dot product, {@code x}<sup>T</sup>{@code y} of the two
  vectors.
  
  @param x the left vector that will be transposed
  @param y the right vector
  
  @return the dot product of the two vectors.
  
  @throws IllegalArgumentException if the two vectors are not of equal
  length