docs: public static boolean isIdentity(ZMatrix mat , double tol ) {
          // see if the result is an identity matrix
          Complex_F64 c = new Complex_F64();
          for (int i = 0; i < mat.getNumRows(); i++) {
              for (int j = 0; j < mat.getNumCols(); j++) {
                  mat.get(i, j, c);
                  if (i == j) {
                      if (!(Math.abs(c.real - 1) <= tol))
                          return false;
                      if (!(Math.abs(c.imaginary) <= tol))
                          return false;
                  } else {
                      if (!(Math.abs(c.real) <= tol))
                          return false;
                      if (!(Math.abs(c.imaginary) <= tol))
                          return false;
                  }
              }
          }
  
          return true;
      }