code: public static int cs_reach(DZcs G, DZcs B, int k, int[] xi, int[] pinv)
  	{
  		int p, n, top, Bp[], Bi[], Gp[] ;
  		if (!CS_CSC (G) || !CS_CSC (B) || xi == null)
  			return (-1) ;	/* check inputs */
  		n = G.n ; Bp = B.p ; Bi = B.i ; Gp = G.p ;
  		top = n ;
  		for (p = Bp [k] ; p < Bp [k+1] ; p++)
  		{
  			if (!CS_MARKED (Gp, Bi [p]))  /* start a dfs at unmarked node i */
  			{
  				top = cs_dfs (Bi [p], G, top, xi, 0, xi, n, pinv, 0) ;
  			}
  		}
  		for (p = top ; p < n ; p++) CS_MARK (Gp, xi [p]) ;  /* restore G */
  		return (top) ;
  	}
docs: Finds a nonzero pattern of x=L\b for sparse L and b.
  
  @param G
  graph to search (G.p modified, then restored)
  @param B
  right hand side, b = B(:,k)
  @param k
  use kth column of B
  @param xi
  size 2*n, output in xi[top..n-1]
  @param pinv
  mapping of rows to columns of G, ignored if null
  @return top, -1 on error