code: private static void eltran(DenseMatrix A, DenseMatrix V, int[] perm) {
          int n = A.nrows();
          for (int mp = n - 2; mp > 0; mp--) {
              for (int k = mp + 1; k < n; k++) {
                  V.set(k, mp, A.get(k, mp - 1));
              }
              int i = perm[mp];
              if (i != mp) {
                  for (int j = mp; j < n; j++) {
                      V.set(mp, j, V.get(i, j));
                      V.set(i, j, 0.0);
                  }
                  V.set(i, mp, 1.0);
              }
          }
      }
docs: Accumulate the stabilized elementary similarity transformations used
  in the reduction of a real nonsymmetric matrix to upper Hessenberg form by elmhes.