SCM

SCM Repository

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

Diff of /pkg/src/dsyMatrix.c

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

revision 2017, Wed Aug 1 15:18:25 2007 UTC revision 2018, Wed Aug 1 15:22:05 2007 UTC
# Line 111  Line 111 
111  SEXP dsyMatrix_matrix_mm(SEXP a, SEXP b, SEXP rtP)  SEXP dsyMatrix_matrix_mm(SEXP a, SEXP b, SEXP rtP)
112  {  {
113      SEXP val = PROTECT(dup_mMatrix_as_dgeMatrix(b));      SEXP val = PROTECT(dup_mMatrix_as_dgeMatrix(b));
114        int rt = asLogical(rtP); /* if(rt), compute b %*% a,  else  a %*% b */
115      int *adims = INTEGER(GET_SLOT(a, Matrix_DimSym)),      int *adims = INTEGER(GET_SLOT(a, Matrix_DimSym)),
116          *bdims = INTEGER(GET_SLOT(b, Matrix_DimSym)),          *bdims = INTEGER(GET_SLOT(b, Matrix_DimSym)),
117          m = bdims[0], n = bdims[1], rt = asLogical(rtP);          m = bdims[0], n = bdims[1];
118      double one = 1., zero = 0.;      double one = 1., zero = 0.;
119    
120      if ((rt && n != adims[0]) || (!rt && m != adims[0]))      if ((rt && n != adims[0]) || (!rt && m != adims[0]))

Legend:
Removed from v.2017  
changed lines
  Added in v.2018

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