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 1710, Tue Dec 26 15:57:06 2006 UTC revision 1736, Tue Jan 23 17:09:41 2007 UTC
# Line 120  Line 120 
120      double *tx = Calloc(bnz, double), *wrk = Calloc(A->n, double);      double *tx = Calloc(bnz, double), *wrk = Calloc(A->n, double);
121    
122      SET_SLOT(ans, Matrix_DimSym, duplicate(GET_SLOT(a, Matrix_DimSym)));      SET_SLOT(ans, Matrix_DimSym, duplicate(GET_SLOT(a, Matrix_DimSym)));
123      SET_SLOT(ans, Matrix_DimNamesSym,      SET_DimNames(ans, a);
              duplicate(GET_SLOT(a, Matrix_DimNamesSym)));  
124      SET_SLOT(ans, Matrix_uploSym, duplicate(GET_SLOT(a, Matrix_uploSym)));      SET_SLOT(ans, Matrix_uploSym, duplicate(GET_SLOT(a, Matrix_uploSym)));
125      SET_SLOT(ans, Matrix_diagSym, duplicate(GET_SLOT(a, Matrix_diagSym)));      SET_SLOT(ans, Matrix_diagSym, duplicate(GET_SLOT(a, Matrix_diagSym)));
126      bp[0] = 0;      bp[0] = 0;
# Line 162  Line 161 
161      if (*adims != n || nrhs < 1 || *adims < 1 || *adims != adims[1])      if (*adims != n || nrhs < 1 || *adims < 1 || *adims != adims[1])
162          error(_("Dimensions of system to be solved are inconsistent"));          error(_("Dimensions of system to be solved are inconsistent"));
163      Memcpy(INTEGER(ALLOC_SLOT(ans, Matrix_DimSym, INTSXP, 2)), bdims, 2);      Memcpy(INTEGER(ALLOC_SLOT(ans, Matrix_DimSym, INTSXP, 2)), bdims, 2);
164      /* copy dimnames or Dimnames as well */      /* FIXME: copy dimnames or Dimnames as well */
165      bx = Memcpy(REAL(ALLOC_SLOT(ans, Matrix_xSym, REALSXP, n * nrhs)),      bx = Memcpy(REAL(ALLOC_SLOT(ans, Matrix_xSym, REALSXP, n * nrhs)),
166                  REAL(cl ? GET_SLOT(b, Matrix_xSym):b), n * nrhs);                  REAL(cl ? GET_SLOT(b, Matrix_xSym):b), n * nrhs);
167      for (j = 0; j < nrhs; j++)      for (j = 0; j < nrhs; j++)
# Line 211  Line 210 
210      Memcpy(REAL(ALLOC_SLOT(ans, Matrix_xSym, REALSXP, nz)), tx, nz);      Memcpy(REAL(ALLOC_SLOT(ans, Matrix_xSym, REALSXP, nz)), tx, nz);
211      Free(tmp); Free(tx); Free(ti);      Free(tmp); Free(tx); Free(ti);
212      SET_SLOT(ans, Matrix_DimSym, duplicate(GET_SLOT(a, Matrix_DimSym)));      SET_SLOT(ans, Matrix_DimSym, duplicate(GET_SLOT(a, Matrix_DimSym)));
213      SET_SLOT(ans, Matrix_DimNamesSym, duplicate(GET_SLOT(a, Matrix_DimNamesSym)));      SET_DimNames(ans, a);
214      SET_SLOT(ans, Matrix_uploSym, duplicate(GET_SLOT(a, Matrix_uploSym)));      SET_SLOT(ans, Matrix_uploSym, duplicate(GET_SLOT(a, Matrix_uploSym)));
215      SET_SLOT(ans, Matrix_diagSym, duplicate(GET_SLOT(a, Matrix_diagSym)));      SET_SLOT(ans, Matrix_diagSym, duplicate(GET_SLOT(a, Matrix_diagSym)));
216      UNPROTECT(1);      UNPROTECT(1);

Legend:
Removed from v.1710  
changed lines
  Added in v.1736

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