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

pkg/src/Csparse.c revision 2519, Fri Feb 5 17:20:14 2010 UTC pkg/Matrix/src/Csparse.c revision 2586, Sun Jul 25 02:32:06 2010 UTC
# Line 425  Line 425 
425  SEXP Csparse_horzcat(SEXP x, SEXP y)  SEXP Csparse_horzcat(SEXP x, SEXP y)
426  {  {
427      CHM_SP chx = AS_CHM_SP__(x), chy = AS_CHM_SP__(y);      CHM_SP chx = AS_CHM_SP__(x), chy = AS_CHM_SP__(y);
428      int Rkind = 0; /* only for "d" - FIXME */      int Rk_x = (chx->xtype != CHOLMOD_PATTERN) ? Real_kind(x) : 0,
429            Rk_y = (chy->xtype != CHOLMOD_PATTERN) ? Real_kind(y) : 0,
430            Rkind = /* logical if both x and y are */ (Rk_x == 1 && Rk_y == 1) ? 1 : 0;
431      R_CheckStack();      R_CheckStack();
432    
433      /* FIXME: currently drops dimnames */      /* TODO: currently drops dimnames - and we fix at R level */
434      return chm_sparse_to_SEXP(cholmod_l_horzcat(chx, chy, 1, &c),      return chm_sparse_to_SEXP(cholmod_l_horzcat(chx, chy, 1, &c),
435                                1, 0, Rkind, "", R_NilValue);                                1, 0, Rkind, "", R_NilValue);
436  }  }
# Line 436  Line 438 
438  SEXP Csparse_vertcat(SEXP x, SEXP y)  SEXP Csparse_vertcat(SEXP x, SEXP y)
439  {  {
440      CHM_SP chx = AS_CHM_SP__(x), chy = AS_CHM_SP__(y);      CHM_SP chx = AS_CHM_SP__(x), chy = AS_CHM_SP__(y);
441      int Rkind = 0; /* only for "d" - FIXME */      int Rk_x = (chx->xtype != CHOLMOD_PATTERN) ? Real_kind(x) : 0,
442            Rk_y = (chy->xtype != CHOLMOD_PATTERN) ? Real_kind(y) : 0,
443            Rkind = /* logical if both x and y are */ (Rk_x == 1 && Rk_y == 1) ? 1 : 0;
444      R_CheckStack();      R_CheckStack();
445    
446      /* FIXME: currently drops dimnames */      /* TODO: currently drops dimnames - and we fix at R level */
447      return chm_sparse_to_SEXP(cholmod_l_vertcat(chx, chy, 1, &c),      return chm_sparse_to_SEXP(cholmod_l_vertcat(chx, chy, 1, &c),
448                                1, 0, Rkind, "", R_NilValue);                                1, 0, Rkind, "", R_NilValue);
449  }  }

Legend:
Removed from v.2519  
changed lines
  Added in v.2586

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