code: private static final void swap(double[] data, int a, int b) {
      double tmp = data[a];
      data[a] = data[b];
      data[b] = tmp;
    }
docs: The usual swap method.
  
  @param data Array
  @param a First index
  @param b Second index