[Lme4-commits] r1420 - pkg/lme4Eigen/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Oct 17 22:30:56 CEST 2011


Author: dmbates
Date: 2011-10-17 22:30:56 +0200 (Mon, 17 Oct 2011)
New Revision: 1420

Modified:
   pkg/lme4Eigen/src/predModule.cpp
Log:
Thinko regarding 0-based indices.


Modified: pkg/lme4Eigen/src/predModule.cpp
===================================================================
--- pkg/lme4Eigen/src/predModule.cpp	2011-10-17 19:35:01 UTC (rev 1419)
+++ pkg/lme4Eigen/src/predModule.cpp	2011-10-17 20:30:56 UTC (rev 1420)
@@ -13,35 +13,6 @@
     using std::endl;
     using std::fill;
 
-#if 0
-    void cholmod_dump_common(cholmod_common& c) {
-	cout << "Cholmod common structure" << endl;
-	cout << "status = " << c.status
-	     << ", dbound = " << c.dbound
-	     << ", grow0 = " << c.grow0
-	     << ", grow1 = " << c.grow1
-	     << ", grow2 = " << c.grow2
-	     << ", maxrank = " << c.maxrank << endl;
-	cout << "supernodal_switch = " << c.supernodal_switch
-	     << ", final_asis = " << c.final_asis
-	     << ", final_super = " << c.final_super
-	     << ", final_ll = " << c.final_ll
-	     << ", final_pack = " << c.final_pack
-	     << ", final_monotonic = " << c.final_monotonic
-	     << ", final_resymbol = " << c.final_resymbol << endl;
-	cout << "prefer_upper = " << c.prefer_upper
-	     << ", print = " << c.print
-	     << ", precise = " << c.precise << endl;
-	cout << "nmethods = " << c.nmethods
-	     << ", current = " << c.current
-	     << ", selected = " << c.selected
-	     << ", postorder = " << c.postorder << endl;
-	cout << "method numbers: " << c.method[0].ordering;
-	for (int i = 1; i < c.nmethods; ++i) cout << ", " << c.method[i].ordering;
-	cout << endl;
-    }
-#endif
-
     merPredD::merPredD(S4 X, S4 Zt, S4 Lambdat, IntegerVector Lind,
 		       NumericVector theta)
 	: d_X(X),
@@ -168,7 +139,7 @@
 	if (d_X.rows() != sqrtXwt.size())
 	    throw invalid_argument("updateXwts: dimension mismatch");
 	if (sqrtXwt.cols() == 1) {
-	    DiagonalMatrix<double, Dynamic> W(sqrtXwt.col(1).asDiagonal());
+	    DiagonalMatrix<double, Dynamic> W(sqrtXwt.col(0).asDiagonal());
 	    d_V              = W * d_X;
 	    d_Ut             = d_Zt * W;
 	} else {



More information about the Lme4-commits mailing list