6 CS_INT top, i, p, k, n, *Li, *Lp, *cp, *pinv, *s, *c, *parent, *Cp, *Ci ;
9 if (!
CS_CSC (A) || !S || !S->cp || !S->parent)
return (NULL) ;
14 cp = S->cp ; pinv = S->pinv ; parent = S->parent ;
17 if (!N || !c || !x || !C)
return (
cs_ndone (N, E, c, x, 0)) ;
19 Cp = C->p ; Ci = C->i ; Cx = C->x ;
21 if (!L)
return (
cs_ndone (N, E, c, x, 0)) ;
22 Lp = L->p ; Li = L->i ; Lx = L->x ;
23 for (k = 0 ; k < n ; k++) Lp [k] = c [k] = cp [k] ;
24 for (k = 0 ; k < n ; k++)
29 for (p = Cp [k] ; p < Cp [k+1] ; p++)
31 if (Ci [p] <= k) x [Ci [p]] = Cx [p] ;
36 for ( ; top < n ; top++)
39 lki = x [i] / Lx [Lp [i]] ;
41 for (p = Lp [i] + 1 ; p < c [i] ; p++)
43 x [Li [p]] -= Lx [p] * lki ;
csn * cs_ndone(csn *N, cs *C, void *w, void *x, CS_INT ok)
csn * cs_chol(const cs *A, const css *S)
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_INT cs_ereach(const cs *A, CS_INT k, const CS_INT *parent, CS_INT *s, CS_INT *w)
cs * cs_symperm(const cs *A, const CS_INT *pinv, CS_INT values)
void * cs_malloc(CS_INT n, size_t size)