5 int n, i, k, b, nb = 0, top, *xi, *pstack, *p, *r, *Ap, *ATp, *rcopy, *Blk ;
8 if (!
CS_CSC (A))
return (NULL) ;
12 xi = (
int*)
cs_malloc (2*n+1,
sizeof (
int)) ;
13 if (!D || !AT || !xi)
return (
cs_ddone (D, AT, xi, 0)) ;
14 Blk = xi ; rcopy = pstack = xi + n ;
15 p = D->
p ; r = D->
r ; ATp = AT->
p ;
17 for (i = 0 ; i < n ; i++)
21 for (i = 0 ; i < n ; i++)
CS_MARK (Ap, i) ;
24 for (k = 0 ; k < n ; k++)
29 top =
cs_dfs (i, AT, top, p, pstack, NULL) ;
32 for (k = nb ; k <= n ; k++) r [k-nb] = r [k] ;
34 for (b = 0 ; b < nb ; b++)
36 for (k = r [b] ; k < r [b+1] ; k++) Blk [p [k]] = b ;
38 for (b = 0 ; b <= nb ; b++) rcopy [b] = r [b] ;
39 for (i = 0 ; i < n ; i++) p [rcopy [Blk [i]]++] = i ;
csd * cs_dalloc(int m, int n)
cs * cs_transpose(const cs *A, int values)
int cs_dfs(int j, cs *G, int top, int *xi, int *pstack, const int *pinv)
csd * cs_ddone(csd *D, cs *C, void *w, int ok)
void * cs_malloc(int n, size_t size)