SCM

SCM Repository

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

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

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

revision 2104, Sat Jan 12 16:09:01 2008 UTC revision 2227, Mon Jul 21 19:49:33 2008 UTC
# Line 2  Line 2 
2    
3  SEXP sparseQR_validate(SEXP x)  SEXP sparseQR_validate(SEXP x)
4  {  {
5      CSP V = AS_CSP(GET_SLOT(x, install("V"))),      CSP V = AS_CSP__(GET_SLOT(x, install("V"))),
6          R = AS_CSP(GET_SLOT(x, install("R")));          R = AS_CSP__(GET_SLOT(x, install("R")));
7      SEXP beta = GET_SLOT(x, install("beta")),      SEXP beta = GET_SLOT(x, install("beta")),
8          p = GET_SLOT(x, Matrix_pSym),          p = GET_SLOT(x, Matrix_pSym),
9          q = GET_SLOT(x, install("q"));          q = GET_SLOT(x, install("q"));
# Line 63  Line 63 
63  SEXP sparseQR_qty(SEXP qr, SEXP y, SEXP trans)  SEXP sparseQR_qty(SEXP qr, SEXP y, SEXP trans)
64  {  {
65      SEXP ans = PROTECT(dup_mMatrix_as_dgeMatrix(y));      SEXP ans = PROTECT(dup_mMatrix_as_dgeMatrix(y));
66      CSP V = AS_CSP(GET_SLOT(qr, install("V")));      CSP V = AS_CSP__(GET_SLOT(qr, install("V")));
67      R_CheckStack();      R_CheckStack();
68    
69      sparseQR_Qmult(V, REAL(GET_SLOT(qr, install("beta"))),      sparseQR_Qmult(V, REAL(GET_SLOT(qr, install("beta"))),
# Line 79  Line 79 
79  {  {
80      SEXP ans = PROTECT(dup_mMatrix_as_dgeMatrix(y)),      SEXP ans = PROTECT(dup_mMatrix_as_dgeMatrix(y)),
81          qslot = GET_SLOT(qr, install("q"));          qslot = GET_SLOT(qr, install("q"));
82      CSP V = AS_CSP(GET_SLOT(qr, install("V"))),      CSP V = AS_CSP__(GET_SLOT(qr, install("V"))),
83          R = AS_CSP(GET_SLOT(qr, install("R")));          R = AS_CSP__(GET_SLOT(qr, install("R")));
84      int *ydims = INTEGER(GET_SLOT(ans, Matrix_DimSym)),      int *ydims = INTEGER(GET_SLOT(ans, Matrix_DimSym)),
85          *q = INTEGER(qslot),          *q = INTEGER(qslot),
86          j, lq = LENGTH(qslot), m = R->m, n = R->n;          j, lq = LENGTH(qslot), m = R->m, n = R->n;
# Line 108  Line 108 
108  SEXP sparseQR_resid_fitted(SEXP qr, SEXP y, SEXP resid)  SEXP sparseQR_resid_fitted(SEXP qr, SEXP y, SEXP resid)
109  {  {
110      SEXP ans = PROTECT(dup_mMatrix_as_dgeMatrix(y));      SEXP ans = PROTECT(dup_mMatrix_as_dgeMatrix(y));
111      CSP V = AS_CSP(GET_SLOT(qr, install("V")));      CSP V = AS_CSP__(GET_SLOT(qr, install("V")));
112      int *ydims = INTEGER(GET_SLOT(ans, Matrix_DimSym)),      int *ydims = INTEGER(GET_SLOT(ans, Matrix_DimSym)),
113          *p = INTEGER(GET_SLOT(qr, Matrix_pSym)),          *p = INTEGER(GET_SLOT(qr, Matrix_pSym)),
114          i, j, m = V->m, n = V->n, res = asLogical(resid);          i, j, m = V->m, n = V->n, res = asLogical(resid);

Legend:
Removed from v.2104  
changed lines
  Added in v.2227

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