SCM

SCM Repository

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

Diff of /pkg/Matrix/src/Csparse.c

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

revision 2387, Fri May 29 12:50:34 2009 UTC revision 2490, Sat Oct 24 20:40:09 2009 UTC
# Line 248  Line 248 
248          cha = AS_CHM_SP(a),          cha = AS_CHM_SP(a),
249          chb = AS_CHM_SP(b),          chb = AS_CHM_SP(b),
250          chc = cholmod_l_ssmult(cha, chb, /*out_stype:*/ 0,          chc = cholmod_l_ssmult(cha, chb, /*out_stype:*/ 0,
251                               cha->xtype, /*out sorted:*/ 1, &c);                                 /* values:= is_numeric (T/F) */ cha->xtype > 0,
252                                   /*out sorted:*/ 1, &c);
253      const char *cl_a = class_P(a), *cl_b = class_P(b);      const char *cl_a = class_P(a), *cl_b = class_P(b);
254      char diag[] = {'\0', '\0'};      char diag[] = {'\0', '\0'};
255      int uploT = 0;      int uploT = 0;
256      SEXP dn = allocVector(VECSXP, 2);      SEXP dn = allocVector(VECSXP, 2);
257      R_CheckStack();      R_CheckStack();
258    
259    #ifdef DEBUG_Matrix
260        Rprintf("DBG Csparse_C*_prod(%s, %s)\n", cl_a, cl_b);
261    #endif
262    
263      /* Preserve triangularity and even unit-triangularity if appropriate.      /* Preserve triangularity and even unit-triangularity if appropriate.
264       * Note that in that case, the multiplication itself should happen       * Note that in that case, the multiplication itself should happen
265       * faster.  But there's no support for that in CHOLMOD */       * faster.  But there's no support for that in CHOLMOD */
# Line 363  Line 368 
368      int trip = asLogical(triplet),      int trip = asLogical(triplet),
369          tr   = asLogical(trans); /* gets reversed because _aat is tcrossprod */          tr   = asLogical(trans); /* gets reversed because _aat is tcrossprod */
370      CHM_TR cht = trip ? AS_CHM_TR(x) : (CHM_TR) NULL;      CHM_TR cht = trip ? AS_CHM_TR(x) : (CHM_TR) NULL;
371    /* workaround originally:
372        CHM_TR cht = trip ? AS_CHM_TR__(Tsparse_diagU2N(x)) : (CHM_TR) NULL;
373    */
374    
375      CHM_SP chcp, chxt,      CHM_SP chcp, chxt,
376          chx = (trip ?          chx = (trip ?
377                 cholmod_l_triplet_to_sparse(cht, cht->nnz, &c) :                 cholmod_l_triplet_to_sparse(cht, cht->nnz, &c) :

Legend:
Removed from v.2387  
changed lines
  Added in v.2490

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge