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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Sep 29 19:50:07 CEST 2011


Author: dmbates
Date: 2011-09-29 19:50:07 +0200 (Thu, 29 Sep 2011)
New Revision: 1409

Modified:
   pkg/lme4Eigen/src/external.cpp
Log:
Add isNullExtPtr .Call'able function for Ptr/ptr formulation.


Modified: pkg/lme4Eigen/src/external.cpp
===================================================================
--- pkg/lme4Eigen/src/external.cpp	2011-09-29 17:48:46 UTC (rev 1408)
+++ pkg/lme4Eigen/src/external.cpp	2011-09-29 17:50:07 UTC (rev 1409)
@@ -250,6 +250,11 @@
 	END_RCPP;
     }
 
+    SEXP isNullExtPtr(SEXP Ptr) {
+	BEGIN_RCPP;
+	return ::Rf_ScalarLogical(XPtr<lmResp>(Ptr) == (lmResp*)NULL);
+	END_RCPP;
+    }
 
     // linear model response (also the base class for other response classes)
 
@@ -355,7 +360,7 @@
 	END_RCPP;
     }
 
-    SEXP lmerDeviance(SEXP pptr_, SEXP rptr_, SEXP theta_) {
+    SEXP lmer_Deviance(SEXP pptr_, SEXP rptr_, SEXP theta_) {
 	// Assume that ppt->updateWts(rpt->sqrtXwt()) has been called once
 	BEGIN_RCPP;
 
@@ -619,8 +624,6 @@
 
 static R_CallMethodDef CallEntries[] = {
 
-    CALLDEF(lmerDeviance, 3),
-
     CALLDEF(Eigen_SSE, 0),
 
     CALLDEF(glm_Create, 2),	  // generate external pointer
@@ -655,6 +658,10 @@
     CALLDEF(glmerWrkIter, 2),
     CALLDEF(glmerLaplace, 8),
 
+    CALLDEF(isNullExtPtr, 1),
+
+    CALLDEF(lm_Create, 1),	  // generate external pointer
+
     CALLDEF(lm_setOffset, 2),	  // setters
     CALLDEF(lm_setWeights, 2),
 
@@ -675,7 +682,8 @@
 
     CALLDEF(lmer_REML, 1),	  // getter
 
-    CALLDEF(lmer_Laplace, 4),     // method
+    CALLDEF(lmer_Deviance, 3),    // method
+    CALLDEF(lmer_Laplace, 4),
 
     CALLDEF(merPredDCreate, 5),	  // generate external pointer
 



More information about the Lme4-commits mailing list