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 3273, Sat Mar 24 16:29:40 2018 UTC revision 3292, Thu Mar 7 20:34:24 2019 UTC
# Line 163  Line 163 
163                                   /* transp: */ FALSE);                                   /* transp: */ FALSE);
164      // -> a [dln]geMatrix      // -> a [dln]geMatrix
165      if(is_sym) { // ==> want  [dln]syMatrix      if(is_sym) { // ==> want  [dln]syMatrix
         const char cl1 = class_P(ans)[0];  
166          PROTECT(ans);          PROTECT(ans);
167            const char cl1 = class_P(ans)[0];
168          SEXP aa = PROTECT(NEW_OBJECT_OF_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
# Line 176  Line 176 
176          return aa;          return aa;
177      }      }
178      else if(is_tri) { // ==> want  [dln]trMatrix      else if(is_tri) { // ==> want  [dln]trMatrix
         const char cl1 = class_P(ans)[0];  
179          PROTECT(ans);          PROTECT(ans);
180            const char cl1 = class_P(ans)[0];
181          SEXP aa = PROTECT(NEW_OBJECT_OF_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

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

root@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