code: public void swapElements(int i, int j) {
          if (i != j) {
              double s = get(i);
              set(i, get(j));
              set(j, s);
          }
      }
docs: Swaps the specified elements of this vector.
  
  @param i element's index
  @param j element's index