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 2494, Mon Nov 2 11:55:36 2009 UTC revision 2495, Wed Nov 11 08:45:21 2009 UTC
# Line 253  Line 253 
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 = PROTECT(allocVector(VECSXP, 2));
257      R_CheckStack();      R_CheckStack();
258    
259  #ifdef DEBUG_Matrix_verbose  #ifdef DEBUG_Matrix_verbose
# Line 281  Line 281 
281                     duplicate(VECTOR_ELT(GET_SLOT(a, Matrix_DimNamesSym), 0)));                     duplicate(VECTOR_ELT(GET_SLOT(a, Matrix_DimNamesSym), 0)));
282      SET_VECTOR_ELT(dn, 1,      SET_VECTOR_ELT(dn, 1,
283                     duplicate(VECTOR_ELT(GET_SLOT(b, Matrix_DimNamesSym), 1)));                     duplicate(VECTOR_ELT(GET_SLOT(b, Matrix_DimNamesSym), 1)));
284        UNPROTECT(1);
285      return chm_sparse_to_SEXP(chc, 1, uploT, /*Rkind*/0, diag, dn);      return chm_sparse_to_SEXP(chc, 1, uploT, /*Rkind*/0, diag, dn);
286  }  }
287    
# Line 294  Line 295 
295      const char *cl_a = class_P(a), *cl_b = class_P(b);      const char *cl_a = class_P(a), *cl_b = class_P(b);
296      char diag[] = {'\0', '\0'};      char diag[] = {'\0', '\0'};
297      int uploT = 0;      int uploT = 0;
298      SEXP dn = allocVector(VECSXP, 2);      SEXP dn = PROTECT(allocVector(VECSXP, 2));
299      R_CheckStack();      R_CheckStack();
300    
301      chTr = cholmod_l_transpose((tr) ? chb : cha, chb->xtype, &c);      chTr = cholmod_l_transpose((tr) ? chb : cha, chb->xtype, &c);
# Line 313  Line 314 
314              }              }
315              else diag[0]= 'N';              else diag[0]= 'N';
316          }          }
   
317      SET_VECTOR_ELT(dn, 0,       /* establish dimnames */      SET_VECTOR_ELT(dn, 0,       /* establish dimnames */
318                     duplicate(VECTOR_ELT(GET_SLOT(a, Matrix_DimNamesSym), (tr) ? 0 : 1)));                     duplicate(VECTOR_ELT(GET_SLOT(a, Matrix_DimNamesSym), (tr) ? 0 : 1)));
319      SET_VECTOR_ELT(dn, 1,      SET_VECTOR_ELT(dn, 1,
320                     duplicate(VECTOR_ELT(GET_SLOT(b, Matrix_DimNamesSym), (tr) ? 0 : 1)));                     duplicate(VECTOR_ELT(GET_SLOT(b, Matrix_DimNamesSym), (tr) ? 0 : 1)));
321        UNPROTECT(1);
322      return chm_sparse_to_SEXP(chc, 1, uploT, /*Rkind*/0, diag, dn);      return chm_sparse_to_SEXP(chc, 1, uploT, /*Rkind*/0, diag, dn);
323  }  }
324    

Legend:
Removed from v.2494  
changed lines
  Added in v.2495

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