[Pomp-commits] r750 - in pkg/pomp: . R inst/include src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 10 21:03:30 CEST 2012


Author: kingaa
Date: 2012-07-10 21:03:29 +0200 (Tue, 10 Jul 2012)
New Revision: 750

Modified:
   pkg/pomp/DESCRIPTION
   pkg/pomp/R/builder.R
   pkg/pomp/inst/include/pomp.h
   pkg/pomp/src/pomp.h
   pkg/pomp/src/pomp_internal.h
   pkg/pomp/src/sir.c
Log:
- fix bug with pompBuilder on mac


Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION	2012-07-03 17:50:53 UTC (rev 749)
+++ pkg/pomp/DESCRIPTION	2012-07-10 19:03:29 UTC (rev 750)
@@ -1,8 +1,8 @@
 Package: pomp
 Type: Package
 Title: Statistical inference for partially observed Markov processes
-Version: 0.43-1
-Date: 2012-07-01
+Version: 0.43-2
+Date: 2012-07-10
 Author: Aaron A. King, Edward L. Ionides, Carles Breto, Steve Ellner, Bruce Kendall, Helen Wearing, Matthew J. Ferrari, Michael Lavine, Daniel C. Reuman
 Maintainer: Aaron A. King <kingaa at umich.edu>
 URL: http://pomp.r-forge.r-project.org

Modified: pkg/pomp/R/builder.R
===================================================================
--- pkg/pomp/R/builder.R	2012-07-03 17:50:53 UTC (rev 749)
+++ pkg/pomp/R/builder.R	2012-07-10 19:03:29 UTC (rev 750)
@@ -110,9 +110,7 @@
              reulermultinom="\tvoid (*reulermultinom)(int,double,double*,double,double*);\nreulermultinom = (void (*)(int,double,double*,double,double*)) R_GetCCallable(\"pomp\",\"reulermultinom\");\n",
              get_pomp_userdata="\tconst SEXP (*get_pomp_userdata)(const char *);\npomp_get_userdata = (const SEXP (*)(const char*)) R_GetCCallable(\"pomp\",\"get_pomp_userdata\");\n",
              get_pomp_userdata_int="\tconst int * (*get_pomp_userdata_int)(const char *);\npomp_get_userdata_int = (const int *(*)(const char*)) R_GetCCallable(\"pomp\",\"get_pomp_userdata_int\");\n",
-             get_pomp_userdata_double="\tconst double * (*get_pomp_userdata_double)(const char *);\npomp_get_userdata_double = (const double *(*)(const char*)) R_GetCCallable(\"pomp\",\"get_pomp_userdata_double\");\n",
-             logit="\tdouble logit(double p){return log(p/(1.0-p));}\n\n",
-             expit="\tdouble expit(double x){return 1.0/(1.0+exp(-x));}\n\n"
+             get_pomp_userdata_double="\tconst double * (*get_pomp_userdata_double)(const char *);\npomp_get_userdata_double = (const double *(*)(const char*)) R_GetCCallable(\"pomp\",\"get_pomp_userdata_double\");\n"
              )
 
 footer <- list(

Modified: pkg/pomp/inst/include/pomp.h
===================================================================
--- pkg/pomp/inst/include/pomp.h	2012-07-03 17:50:53 UTC (rev 749)
+++ pkg/pomp/inst/include/pomp.h	2012-07-10 19:03:29 UTC (rev 750)
@@ -193,7 +193,14 @@
 // a vector of parameters ('coef') against a vector of basis-function values ('basis')
 double dot_product (int dim, const double *basis, const double *coef);
 
+static R_INLINE double logit (double p) {
+  return log(p/(1.0-p));
+}
 
+static R_INLINE double expit (double x) {
+  return 1.0/(1.0+exp(-x));
+}
+
 // prototypes for C-level access to Euler-multinomial distribution functions
 
 // simulate Euler-multinomial transitions

Modified: pkg/pomp/src/pomp.h
===================================================================
--- pkg/pomp/src/pomp.h	2012-07-03 17:50:53 UTC (rev 749)
+++ pkg/pomp/src/pomp.h	2012-07-10 19:03:29 UTC (rev 750)
@@ -193,7 +193,14 @@
 // a vector of parameters ('coef') against a vector of basis-function values ('basis')
 double dot_product (int dim, const double *basis, const double *coef);
 
+static R_INLINE double logit (double p) {
+  return log(p/(1.0-p));
+}
 
+static R_INLINE double expit (double x) {
+  return 1.0/(1.0+exp(-x));
+}
+
 // prototypes for C-level access to Euler-multinomial distribution functions
 
 // simulate Euler-multinomial transitions

Modified: pkg/pomp/src/pomp_internal.h
===================================================================
--- pkg/pomp/src/pomp_internal.h	2012-07-03 17:50:53 UTC (rev 749)
+++ pkg/pomp/src/pomp_internal.h	2012-07-10 19:03:29 UTC (rev 750)
@@ -240,14 +240,6 @@
   return x;
 }
 
-static R_INLINE double expit (double x) {
-  return 1.0/(1.0 + exp(-x));
-}
-
-static R_INLINE double logit (double x) {
-  return log(x/(1-x));
-}
-
 static R_INLINE SEXP getListElement (SEXP list, const char *str)
 {
   SEXP elmt = R_NilValue;

Modified: pkg/pomp/src/sir.c
===================================================================
--- pkg/pomp/src/sir.c	2012-07-03 17:50:53 UTC (rev 749)
+++ pkg/pomp/src/sir.c	2012-07-10 19:03:29 UTC (rev 750)
@@ -4,14 +4,6 @@
 
 #include "pomp.h"
 
-static double expit (double x) {
-  return 1.0/(1.0 + exp(-x));
-}
-
-static double logit (double x) {
-  return log(x/(1-x));
-}
-
 // static double term_time (double t, double b0, double b1) 
 // {
 //   static double correction = 0.4958904;



More information about the pomp-commits mailing list