SCM

SCM Repository

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

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

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

revision 3011, Mon Oct 6 17:00:48 2014 UTC revision 3036, Sat Jan 17 23:06:12 2015 UTC
# Line 90  Line 90 
90          error(_("Dimensions of system to be solved are inconsistent"));          error(_("Dimensions of system to be solved are inconsistent"));
91      Memcpy(INTEGER(ALLOC_SLOT(ans, Matrix_DimSym, INTSXP, 2)), bdims, 2);      Memcpy(INTEGER(ALLOC_SLOT(ans, Matrix_DimSym, INTSXP, 2)), bdims, 2);
92      // dimnames:      // dimnames:
93      SEXP dn = PROTECT(allocVector(VECSXP, 2));      SEXP dn = PROTECT(allocVector(VECSXP, 2)), dn2;
94      SET_VECTOR_ELT(dn, 0, duplicate(VECTOR_ELT(GET_SLOT(a, Matrix_DimNamesSym), 1)));      SET_VECTOR_ELT(dn, 0, duplicate(VECTOR_ELT(GET_SLOT(a, Matrix_DimNamesSym), 1)));
95        if(!cl) {
96            dn2 = getAttrib(b, R_DimNamesSymbol);
97            if(dn2 != R_NilValue) // either NULL or  list(<dn1>, <dn2>)
98                dn2 = VECTOR_ELT(dn2, 1);
99        }
100      SET_VECTOR_ELT(dn, 1, duplicate(cl // b can be "Matrix" or not:      SET_VECTOR_ELT(dn, 1, duplicate(cl // b can be "Matrix" or not:
101                                      ? VECTOR_ELT(GET_SLOT(b, Matrix_DimNamesSym), 1)                                      ? VECTOR_ELT(GET_SLOT(b, Matrix_DimNamesSym), 1)
102                                      : getAttrib(b, R_DimNamesSymbol)));                                      : dn2));
103      SET_SLOT(ans, Matrix_DimNamesSym, dn);      SET_SLOT(ans, Matrix_DimNamesSym, dn);
104      UNPROTECT(1);      UNPROTECT(1);
105      if(n >= 1 && nrhs >=1) {      if(n >= 1 && nrhs >=1) {

Legend:
Removed from v.3011  
changed lines
  Added in v.3036

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