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 3270, Fri Mar 23 08:50:48 2018 UTC revision 3273, Sat Mar 24 16:29:40 2018 UTC
# Line 165  Line 165 
165      if(is_sym) { // ==> want  [dln]syMatrix      if(is_sym) { // ==> want  [dln]syMatrix
166          const char cl1 = class_P(ans)[0];          const char cl1 = class_P(ans)[0];
167          PROTECT(ans);          PROTECT(ans);
168          SEXP aa = PROTECT(NEW_OBJECT(MAKE_CLASS((cl1 == 'd') ? "dsyMatrix" :          SEXP aa = PROTECT(NEW_OBJECT_OF_CLASS((cl1 == 'd') ? "dsyMatrix" :
169                                                  ((cl1 == 'l') ? "lsyMatrix" : "nsyMatrix"))));                                                ((cl1 == 'l') ? "lsyMatrix" : "nsyMatrix")));
170          // No need to duplicate() as slots of ans are freshly allocated and ans will not be used          // No need to duplicate() as slots of ans are freshly allocated and ans will not be used
171          SET_SLOT(aa, Matrix_xSym,       GET_SLOT(ans, Matrix_xSym));          SET_SLOT(aa, Matrix_xSym,       GET_SLOT(ans, Matrix_xSym));
172          SET_SLOT(aa, Matrix_DimSym,     GET_SLOT(ans, Matrix_DimSym));          SET_SLOT(aa, Matrix_DimSym,     GET_SLOT(ans, Matrix_DimSym));
# Line 178  Line 178 
178      else if(is_tri) { // ==> want  [dln]trMatrix      else if(is_tri) { // ==> want  [dln]trMatrix
179          const char cl1 = class_P(ans)[0];          const char cl1 = class_P(ans)[0];
180          PROTECT(ans);          PROTECT(ans);
181          SEXP aa = PROTECT(NEW_OBJECT(MAKE_CLASS((cl1 == 'd') ? "dtrMatrix" :          SEXP aa = PROTECT(NEW_OBJECT_OF_CLASS((cl1 == 'd') ? "dtrMatrix" :
182                                                  ((cl1 == 'l') ? "ltrMatrix" : "ntrMatrix"))));                                                ((cl1 == 'l') ? "ltrMatrix" : "ntrMatrix")));
183          // No need to duplicate() as slots of ans are freshly allocated and ans will not be used          // No need to duplicate() as slots of ans are freshly allocated and ans will not be used
184          SET_SLOT(aa, Matrix_xSym,       GET_SLOT(ans, Matrix_xSym));          SET_SLOT(aa, Matrix_xSym,       GET_SLOT(ans, Matrix_xSym));
185          SET_SLOT(aa, Matrix_DimSym,     GET_SLOT(ans, Matrix_DimSym));          SET_SLOT(aa, Matrix_DimSym,     GET_SLOT(ans, Matrix_DimSym));

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

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