SCM

SCM Repository

[matrix] Diff of /pkg/src/sscMatrix.c
ViewVC logotype

Diff of /pkg/src/sscMatrix.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 152, Fri May 7 19:32:21 2004 UTC revision 153, Fri May 7 19:35:35 2004 UTC
# Line 177  Line 177 
177      UNPROTECT(1);      UNPROTECT(1);
178      return ans;      return ans;
179  }  }
180    
181    SEXP sscMatrix_ldl_symbolic(SEXP x)
182    {
183        SEXP ans = PROTECT(allocVector(VECSXP, 2));
184        int lo = toupper(CHAR(asChar(GET_SLOT(x, Matrix_uploSym)))[0]) == 'L',
185            n = INTEGER(GET_SLOT(x, Matrix_DimSym))[0];
186    
187        if (lo) x = PROTECT(ssc_transpose(x));
188        SET_VECTOR_ELT(ans, 0, allocVector(INTSXP, n));
189        SET_VECTOR_ELT(ans, 1, allocVector(INTSXP, n + 1));
190        ldl_symbolic(n, INTEGER(GET_SLOT(x, Matrix_pSym)),
191                     INTEGER(GET_SLOT(x, Matrix_iSym)),
192                     INTEGER(VECTOR_ELT(ans, 1)), /* Lp */
193                     INTEGER(VECTOR_ELT(ans, 0)), /* Parent */
194                     (int *) R_alloc(n, sizeof(int)), /* Lnz */
195                     (int *) R_alloc(n, sizeof(int)), /* Flag */
196                     (int *) NULL, (int *) NULL);  /* P & Pinv */
197        UNPROTECT(lo ? 2 : 1);
198        return ans;
199    }

Legend:
Removed from v.152  
changed lines
  Added in v.153

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge