5 CS_INT m, n, nz, p, k, *Cp, *Ci, *w, *Ti, *Tj ;
9 m = T->m ; n = T->n ; Ti = T->i ; Tj = T->p ; Tx = T->x ; nz = T->nz ;
12 if (!C || !w)
return (
cs_done (C, w, NULL, 0)) ;
13 Cp = C->p ; Ci = C->i ; Cx = C->x ;
14 for (k = 0 ; k < nz ; k++) w [Tj [k]]++ ;
16 for (k = 0 ; k < nz ; k++)
18 Ci [p = w [Tj [k]]++] = Ti [k] ;
19 if (Cx) Cx [p] = Tx [k] ;
21 return (
cs_done (C, w, NULL, 1)) ;
double cs_cumsum(CS_INT *p, CS_INT *c, CS_INT n)
cs * cs_spalloc(CS_INT m, CS_INT n, CS_INT nzmax, CS_INT values, CS_INT triplet)
void * cs_calloc(CS_INT n, size_t size)
cs * cs_compress(const cs *T)
cs * cs_done(cs *C, void *w, void *x, CS_INT ok)