code: static void reverse(double[] d, DenseMatrix V) {
          int m = V.nrows();
          int n = d.length;
          int half = n / 2;
          for (int i = 0; i < half; i++) {
              double tmp = d[i];
              d[i] = d[n - i - 1];
              d[n - i - 1] = tmp;
          }
          for (int j = 0; j < half; j++) {
              for (int i = 0; i < m; i++) {
                  double tmp = V.get(i, j);
                  V.set(i, j, V.get(i, n - j - 1));
                  V.set(i, n - j - 1, tmp);
              }
          }
      }
docs: Reverse the array to match JMatrix.