docs: private static int searchNzRowsInX_DFS(int rowB , DMatrixSparseCSC G , int top , int pinv[], int xi[], int w[] )
      {
          int N = G.numCols;  // first N elements in w is the length of X
          int head = 0; // put the selected row into the FILO stack
          xi[head] = rowB; // use the head of xi to store where the stack it's searching.  The tail is where
                           // the graph ordered list of rows in B is stored.
          while( head >= 0 ) {
              // the column in G being examined
              int G_col = xi[head];
              int G_col_new = pinv != null ? pinv[G_col] : G_col;
              if( w[G_col] == 0) {
                  w[G_col] = 1;
                  // mark which child in the loop below it's examining
                  w[N+head] = G_col_new < 0  || G_col_new >= N ? 0 : G.col_idx[G_col_new];
              }
  
              // See if there are any children which have yet to be examined
              boolean done = true;
  
              // The Right side after || is used to handle tall matrices. There will be no nodes matching
              int idx0 = w[N+head];
              int idx1 = G_col_new < 0 || G_col_new >= N ? 0 : G.col_idx[G_col_new+1];
  
              for (int j = idx0; j < idx1; j++) {
                  int jrow = G.nz_rows[j];
                  if( jrow < N && w[jrow] == 0 ) {
                      w[N+head] = j+1; // mark that it has processed up to this point
                      xi[++head] = jrow;
                      done = false;
                      break;          // It's a DFS so break and continue down
                  }
              }
  
              if( done ) {
                  head--;
                  xi[--top] = G_col;
              }
          }
          return top;
      }