SCM

SCM Repository

[matrix] Diff of /branches/trunk-lme4/src/lmer.c
ViewVC logotype

Diff of /branches/trunk-lme4/src/lmer.c

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

revision 1546, Mon Sep 11 14:49:05 2006 UTC revision 1547, Mon Sep 11 14:49:39 2006 UTC
# Line 1875  Line 1875 
1875          int nci = nc[i];          int nci = nc[i];
1876          int nlev = LENGTH(getAttrib(VECTOR_ELT(fl, i), R_LevelsSymbol));          int nlev = LENGTH(getAttrib(VECTOR_ELT(fl, i), R_LevelsSymbol));
1877          SET_VECTOR_ELT(Omega, i,          SET_VECTOR_ELT(Omega, i,
1878                         M_alloc_dpoMatrix(nci, "U",                         alloc_dpoMatrix(nci, "U",
1879                                           VECTOR_ELT(cnames, i),                                           VECTOR_ELT(cnames, i),
1880                                           VECTOR_ELT(cnames, i)));                                           VECTOR_ELT(cnames, i)));
1881          SET_VECTOR_ELT(bVar, i, alloc3Darray(REALSXP, nci, nci, nlev));          SET_VECTOR_ELT(bVar, i, alloc3Darray(REALSXP, nci, nci, nlev));
# Line 1887  Line 1887 
1887                        CHOLMOD_PATTERN, &c);                        CHOLMOD_PATTERN, &c);
1888      ts2 = M_cholmod_copy(ts1, -1/*lower triangle*/, CHOLMOD_PATTERN, &c);      ts2 = M_cholmod_copy(ts1, -1/*lower triangle*/, CHOLMOD_PATTERN, &c);
1889      SET_SLOT(val, lme4_ZtZSym,      SET_SLOT(val, lme4_ZtZSym,
1890               M_alloc_dsCMatrix(q, M_cholmod_nnz(ts2, &c), "U", R_NilValue,               alloc_dsCMatrix(q, M_cholmod_nnz(ts2, &c), "U", R_NilValue,
1891                                 R_NilValue));                                 R_NilValue));
1892      i = c.supernodal;      i = c.supernodal;
1893      c.supernodal = CHOLMOD_SUPERNODAL; /* force a supernodal decomposition */      c.supernodal = CHOLMOD_SUPERNODAL; /* force a supernodal decomposition */
# Line 1904  Line 1904 
1904      c.supernodal = i;           /* restore previous setting */      c.supernodal = i;           /* restore previous setting */
1905      M_cholmod_free_sparse(&ts1, &c); M_cholmod_free_sparse(&ts2, &c);      M_cholmod_free_sparse(&ts1, &c); M_cholmod_free_sparse(&ts2, &c);
1906                                  /* create ZtX, RZX, XtX, RXX */                                  /* create ZtX, RZX, XtX, RXX */
1907      SET_SLOT(val, lme4_ZtXSym, M_alloc_dgeMatrix(q, p, R_NilValue, xnms));      SET_SLOT(val, lme4_ZtXSym, alloc_dgeMatrix(q, p, R_NilValue, xnms));
1908      SET_SLOT(val, lme4_RZXSym, M_alloc_dgeMatrix(q, p, R_NilValue, xnms));      SET_SLOT(val, lme4_RZXSym, alloc_dgeMatrix(q, p, R_NilValue, xnms));
1909      SET_SLOT(val, lme4_XtXSym, M_alloc_dpoMatrix(p, "U", xnms, xnms));      SET_SLOT(val, lme4_XtXSym, alloc_dpoMatrix(p, "U", xnms, xnms));
1910      SET_SLOT(val, lme4_RXXSym, M_alloc_dtrMatrix(p, "U", "N", xnms, xnms));      SET_SLOT(val, lme4_RXXSym, alloc_dtrMatrix(p, "U", "N", xnms, xnms));
1911      SET_SLOT(val, lme4_ZtySym, allocVector(REALSXP, q));      SET_SLOT(val, lme4_ZtySym, allocVector(REALSXP, q));
1912      SET_SLOT(val, lme4_rZySym, allocVector(REALSXP, q));      SET_SLOT(val, lme4_rZySym, allocVector(REALSXP, q));
1913      SET_SLOT(val, lme4_XtySym, allocVector(REALSXP, p));      SET_SLOT(val, lme4_XtySym, allocVector(REALSXP, p));
# Line 1922  Line 1922 
1922                                  /* secondary slots */                                  /* secondary slots */
1923      SET_SLOT(val, lme4_ranefSym, allocVector(REALSXP, q));      SET_SLOT(val, lme4_ranefSym, allocVector(REALSXP, q));
1924      SET_SLOT(val, lme4_fixefSym, allocVector(REALSXP, p));      SET_SLOT(val, lme4_fixefSym, allocVector(REALSXP, p));
1925      SET_SLOT(val, lme4_RZXinvSym, M_alloc_dgeMatrix(q, p, R_NilValue, xnms));      SET_SLOT(val, lme4_RZXinvSym, alloc_dgeMatrix(q, p, R_NilValue, xnms));
1926                                  /* initialize */                                  /* initialize */
1927      mer_initial(val);      mer_initial(val);
1928      /* The next calls are simply to set up the L slot.  At present the      /* The next calls are simply to set up the L slot.  At present the

Legend:
Removed from v.1546  
changed lines
  Added in v.1547

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