5 CS_INT j, p, nz = 0, n, *Ap, *Ai ;
7 if (!
CS_CSC (A) || !fkeep)
return (-1) ;
8 n = A->n ; Ap = A->p ; Ai = A->i ; Ax = A->x ;
9 for (j = 0 ; j < n ; j++)
13 for ( ; p < Ap [j+1] ; p++)
15 if (fkeep (Ai [p], j, Ax ? Ax [p] : 1, other))
17 if (Ax) Ax [nz] = Ax [p] ;
CS_INT cs_fkeep(cs *A, CS_INT(*fkeep)(CS_INT, CS_INT, CS_ENTRY, void *), void *other)
CS_INT cs_sprealloc(cs *A, CS_INT nzmax)