SCM

SCM Repository

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

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

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

revision 3269, Wed Mar 21 23:15:18 2018 UTC revision 3270, Fri Mar 23 08:50:48 2018 UTC
# Line 125  Line 125 
125    
126      if (ctype < 0)      if (ctype < 0)
127          error(_("invalid class of object to %s"), "Matrix_cs_to_SEXP");          error(_("invalid class of object to %s"), "Matrix_cs_to_SEXP");
128      SEXP ans = PROTECT(NEW_OBJECT(MAKE_CLASS(cl)));      SEXP ans = PROTECT(NEW_OBJECT_OF_CLASS(cl));
129                                  /* allocate and copy common slots */                                  /* allocate and copy common slots */
130      int *dims = INTEGER(ALLOC_SLOT(ans, Matrix_DimSym, INTSXP, 2));      int *dims = INTEGER(ALLOC_SLOT(ans, Matrix_DimSym, INTSXP, 2));
131      PROTECT(dn); // <- as in chm_sparse_to_SEXP()      PROTECT(dn); // <- as in chm_sparse_to_SEXP()
# Line 245  Line 245 
245      if (ctype < 0)      if (ctype < 0)
246          error(_("Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)"),          error(_("Inappropriate class cl='%s' in Matrix_css_to_SEXP(S, cl, ..)"),
247                cl);                cl);
248      ans = PROTECT(NEW_OBJECT(MAKE_CLASS(cl)));      ans = PROTECT(NEW_OBJECT_OF_CLASS(cl));
249                                  /* allocate and copy common slots */                                  /* allocate and copy common slots */
250      Memcpy(INTEGER(ALLOC_SLOT(ans, install("Q"), INTSXP, n)), S->q, n);      Memcpy(INTEGER(ALLOC_SLOT(ans, install("Q"), INTSXP, n)), S->q, n);
251      nz = INTEGER(ALLOC_SLOT(ans, install("nz"), INTSXP, 3));      nz = INTEGER(ALLOC_SLOT(ans, install("nz"), INTSXP, 3));
# Line 291  Line 291 
291      if (ctype < 0)      if (ctype < 0)
292          error(_("Inappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)"),          error(_("Inappropriate class cl='%s' in Matrix_csn_to_SEXP(S, cl, ..)"),
293                cl);                cl);
294      ans = PROTECT(NEW_OBJECT(MAKE_CLASS(cl)));      ans = PROTECT(NEW_OBJECT_OF_CLASS(cl));
295                                  /* allocate and copy common slots */                                  /* allocate and copy common slots */
296      /* FIXME: Use the triangular matrix classes for csn_LU */      /* FIXME: Use the triangular matrix classes for csn_LU */
297      SET_SLOT(ans, install("L"), /* these are free'd later if requested */      SET_SLOT(ans, install("L"), /* these are free'd later if requested */

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

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