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 3258, Sat Mar 17 06:18:00 2018 UTC revision 3270, Fri Mar 23 08:50:48 2018 UTC
# Line 246  Line 246 
246      ncl[0] = (r_kind == x_double ? 'd' :      ncl[0] = (r_kind == x_double ? 'd' :
247                (r_kind == x_logical ? 'l' :                (r_kind == x_logical ? 'l' :
248                 /* else (for now):  r_kind == x_integer : */ 'i'));                 /* else (for now):  r_kind == x_integer : */ 'i'));
249      PROTECT(ans = NEW_OBJECT(MAKE_CLASS(ncl)));      PROTECT(ans = NEW_OBJECT_OF_CLASS(ncl));
250      // create a correct 'x' slot:      // create a correct 'x' slot:
251      switch(r_kind) {      switch(r_kind) {
252          int i;          int i;
# Line 1261  Line 1261 
1261      A = cholmod_triplet_to_sparse(T, nnz, &c);      A = cholmod_triplet_to_sparse(T, nnz, &c);
1262      cholmod_free_triplet(&T, &c);      cholmod_free_triplet(&T, &c);
1263      /* copy the information to the SEXP */      /* copy the information to the SEXP */
1264      ans = PROTECT(NEW_OBJECT(MAKE_CLASS(cls)));      ans = PROTECT(NEW_OBJECT_OF_CLASS(cls));
1265  // FIXME: This has been copied from chm_sparse_to_SEXP in  chm_common.c  // FIXME: This has been copied from chm_sparse_to_SEXP in  chm_common.c
1266      /* allocate and copy common slots */      /* allocate and copy common slots */
1267      nnz = cholmod_nnz(A, &c);      nnz = cholmod_nnz(A, &c);
# Line 1325  Line 1325 
1325      /* if (ccls[1] != 'g') */      /* if (ccls[1] != 'g') */
1326      /*  error(_("Only 'g'eneral sparse matrix types allowed")); */      /*  error(_("Only 'g'eneral sparse matrix types allowed")); */
1327    
1328      SEXP ans = PROTECT(NEW_OBJECT(MAKE_CLASS(ccls)));      SEXP ans = PROTECT(NEW_OBJECT_OF_CLASS(ccls));
1329      SET_SLOT(ans, Matrix_DimSym, d_x);      SET_SLOT(ans, Matrix_DimSym, d_x);
1330      SET_SLOT(ans, Matrix_DimNamesSym, (!isNull(dn_x) && LENGTH(dn_x) == 2)      SET_SLOT(ans, Matrix_DimNamesSym, (!isNull(dn_x) && LENGTH(dn_x) == 2)
1331               ? duplicate(dn_x)               ? duplicate(dn_x)

Legend:
Removed from v.3258  
changed lines
  Added in v.3270

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