[Pomp-commits] r1118 - pkg/pomp pkg/pomp/inst/include pkg/pomp/src www/vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Mar 1 04:40:13 CET 2015


Author: kingaa
Date: 2015-03-01 04:40:12 +0100 (Sun, 01 Mar 2015)
New Revision: 1118

Added:
   www/vignettes/ecology.csl
Modified:
   pkg/pomp/DESCRIPTION
   pkg/pomp/inst/include/pomp.h
   pkg/pomp/src/pomp.h
Log:
- rearrange pomp.h

Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION	2015-02-28 17:56:04 UTC (rev 1117)
+++ pkg/pomp/DESCRIPTION	2015-03-01 03:40:12 UTC (rev 1118)
@@ -1,8 +1,8 @@
 Package: pomp
 Type: Package
 Title: Statistical Inference for Partially Observed Markov Processes
-Version: 0.62-1
-Date: 2015-02-27
+Version: 0.62-2
+Date: 2015-02-28
 Authors at R: c(person(given=c("Aaron","A."),family="King",
 		role=c("aut","cre"),email="kingaa at umich.edu"),
 	  person(given=c("Edward","L."),family="Ionides",role=c("aut")),

Modified: pkg/pomp/inst/include/pomp.h
===================================================================
--- pkg/pomp/inst/include/pomp.h	2015-02-28 17:56:04 UTC (rev 1117)
+++ pkg/pomp/inst/include/pomp.h	2015-03-01 03:40:12 UTC (rev 1118)
@@ -8,201 +8,9 @@
 #include <Rinternals.h>
 #include <R_ext/Rdynload.h>
 
-// FACILITIES FOR EXTRACTING R OBJECTS FROM THE 'USERDATA' SLOT
-const SEXP get_pomp_userdata (const char *name);
-const int *get_pomp_userdata_int (const char *name);
-const double *get_pomp_userdata_double (const char *name);
-
 // FACILITY FOR EVALUATING A SET OF PERIODIC BSPLINE BASIS FUNCTIONS
 void periodic_bspline_basis_eval (double x, double period, int degree, int nbasis, double *y);
 
-// PROTOTYPE FOR PARAMETER TRANSFORMATION FUNCTION.
-typedef void pomp_transform_fn (double *pt, double *p, int *parindex);
-
-// PROTOTYPE FOR STOCHASTIC SIMULATION ALGORITHM REACTION-RATE FUNCTION, AS USED BY "GILLESPIE.SIM":
-typedef double pomp_ssa_rate_fn(int j, double t, const double *x, const double *p,
-				int *stateindex, int *parindex, int *covindex,
-				int ncovar, double *covars);
-// Description:
-//  on input:
-// j          = integer specifying the number of the reaction whose rate is desired
-// t          = time at which the rates are to be evaluated
-// x          = vector of state variables
-// p          = vector of parameters
-// stateindex = pointer to vector of integers pointing to the states in 'x' in the order specified by 
-//                the 'statenames' argument of 'SSA.simulator'
-// parindex   = pointer to vector of integers pointing to the parameters in 'p' in the order specified by 
-//                the 'paramnames' argument of 'SSA.simulator'
-// covindex   = pointer to vector of integers pointing to the covariates in 'covars' in the order 
-//                specified by the 'covarnames' argument of 'SSA.simulator'
-// ncovars    = number of covariates
-// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
-//                from the covariate table supplied to 'SSA.simulator'
-//  returns the rate of the j-th reaction
-
-// PROTOTYPE FOR ONE-STEP SIMULATOR, AS USED BY "EULER.SIM" AND "ONESTEP.SIM":
-typedef void pomp_onestep_sim(double *x, const double *p, 
-			      const int *stateindex, const int *parindex, const int *covindex,
-			      int ncovars, const double *covars,
-			      double t, double dt);
-// Description:
-//  on input:
-// x          = pointer to state vector
-// p          = pointer to parameter vector
-// stateindex = pointer to vector of integers pointing to the states in 'x' in the order specified by 
-//                the 'statenames' argument of 'euler.simulator'
-// parindex   = pointer to vector of integers pointing to the parameters in 'p' in the order specified by 
-//                the 'paramnames' argument of 'euler.simulator'
-// covindex   = pointer to vector of integers pointing to the covariates in 'covars' in the order 
-//                specified by the 'covarnames' argument of 'euler.simulator'
-// ncovars    = number of covariates
-// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
-//                from the covariate table supplied to 'euler.simulator'
-// t          = time at the beginning of the Euler step
-// dt         = size (duration) of the Euler step
-//  on output:
-// x          = contains the new state vector (i.e., at time t+dt)
-//
-// NB: There is no need to call GetRNGstate() or PutRNGstate() in the body of the user-defined function.
-//     The RNG is initialized before any call to this function, and the RNG state is written afterward.
-//     Inclusion of these calls in the user-defined function may result in significant slowdown.
-
-
-// PROTOTYPE FOR ONE-STEP LOG PROBABILITY DENSITY FUNCTION, AS USED BY "ONESTEP.DENS":
-typedef void pomp_onestep_pdf(double *f, 
-			      double *x1, double *x2, double t1, double t2, const double *p, 
-			      const int *stateindex, const int *parindex, const int *covindex,
-			      int ncovars, const double *covars);
-// Description:
-//  on input:
-// x1         = pointer to state vector at time t1
-// x2         = pointer to state vector at time t2
-// t1         = time corresponding to x1
-// t2         = time corresponding to x2
-// p          = pointer to parameter vector
-// stateindex = pointer to vector of integers indexing the states in 'x' in the order specified by 
-//                the 'statenames' argument of 'euler.density'
-// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
-//                the 'paramnames' argument of 'euler.density'
-// covindex   = pointer to vector of integers indexing the parameters in 'covar'' in the order specified by 
-//                the 'covarnames' argument of 'euler.density'
-// ncovars    = number of covariates
-// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
-//                from the covariate table supplied to 'euler.density'
-//  on output:
-// f          = pointer to the probability density (a single scalar)
-
-// PROTOTYPE FOR DETERMINISTIC SKELETON EVALUATION
-typedef void pomp_skeleton (double *f, double *x, double *p, 
-			    int *stateindex, int *parindex, int *covindex, 
-			    int ncovars, double *covars, double t);
-
-// Description:
-//  on input:
-// x          = pointer to state vector at time t
-// p          = pointer to parameter vector
-// stateindex = pointer to vector of integers indexing the states in 'x' in the order specified by 
-//                the 'statenames' slot
-// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
-//                the 'paramnames' slot
-// covindex   = pointer to vector of integers indexing the parameters in 'covar'' in the order specified by 
-//                the 'covarnames' slot
-// ncovars    = number of covariates
-// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
-//                from the covariate table supplied to 'pomp.skeleton'
-// t          = time at the beginning of the Euler step
-//  on output:
-// f          = pointer to value of the map or vectorfield (a vector of the same length as 'x')
-
-// PROTOTYPE FOR MEASUREMENT MODEL SIMULATION
-typedef void pomp_measure_model_simulator (double *y, double *x, double *p, 
-					   int *obsindex, int *stateindex, int *parindex, int *covindex,
-					   int ncovars, double *covars, double t);
-// Description:
-//  on input:
-// x          = pointer to state vector at time t
-// p          = pointer to parameter vector
-// obsindex   = pointer to vector of integers indexing the variables in 'y' in the order specified by 
-//                the 'obsnames' slot
-// stateindex = pointer to vector of integers indexing the states in 'x' in the order specified by 
-//                the 'statenames' slot
-// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
-//                the 'paramnames' slot
-// covindex   = pointer to vector of integers indexing the parameters in 'covar'' in the order specified by 
-//                the 'covarnames' slot
-// ncovars    = number of covariates
-// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
-//                from the covariate table supplied to 'pomp.skeleton'
-// t          = time at the beginning of the Euler step
-//  on output:
-// y          = pointer to vector containing simulated observations (length = nobs = nrow(data))
-//
-// NB: There is no need to call GetRNGstate() or PutRNGstate() in the body of the user-defined function.
-//     The RNG is initialized before any call to this function, and the RNG state is written afterward.
-//     Inclusion of these calls in the user-defined function may result in significant slowdown.
-
-
-// PROTOTYPE FOR MEASUREMENT MODEL DENSITY EVALUATOR
-typedef void pomp_measure_model_density (double *lik, double *y, double *x, double *p, int give_log,
-					 int *obsindex, int *stateindex, int *parindex, int *covindex,
-					 int ncovars, double *covars, double t);
-// Description:
-//  on input:
-// y          = pointer to vector of observables at time t
-// x          = pointer to state vector at time t
-// p          = pointer to parameter vector
-// give_log   = should the log likelihood be returned?
-// obsindex   = pointer to vector of integers indexing the variables in 'y' in the order specified by 
-//                the 'obsnames' slot
-// stateindex = pointer to vector of integers indexing the states in 'x' in the order specified by 
-//                the 'statenames' slot
-// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
-//                the 'paramnames' slot
-// covindex   = pointer to vector of integers indexing the parameters in 'covar'' in the order specified by 
-//                the 'covarnames' slot
-// ncovars    = number of covariates
-// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
-//                from the covariate table supplied to 'pomp.skeleton'
-// t          = time at the beginning of the Euler step
-//  on output:
-// lik        = pointer to scalar containing (log) likelihood
-
-// PROTOTYPE FOR PRIOR SIMULATION
-typedef void pomp_rprior (double *p, int *parindex);
-// Description:
-//  on input:
-// p          = pointer to parameter vector
-// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
-//                the 'paramnames' slot
-//  on output:
-// p          = pointer to vector containing draws from the prior
-//
-// NB: There is no need to call GetRNGstate() or PutRNGstate() in the body of the user-defined function.
-//     The RNG is initialized before any call to this function, and the RNG state is written afterward.
-//     Inclusion of these calls in the user-defined function may result in significant slowdown.
-
-// PROTOTYPE FOR PRIOR DENSITY EVALUATION
-typedef void pomp_dprior (double *lik, double *p, int give_log, int *parindex);
-// Description:
-//  on input:
-// p          = pointer to parameter vector
-// give_log   = should the log likelihood be returned?
-// parindex   = pointer to vector of integers indexing the parameters 
-//              in 'p' in the order specified by the 'paramnames' slot
-//  on output:
-// lik        = pointer to vector containing likelihoods
-
-// UTILITY FOR EXPONENTIAL/GEOMETRIC RATE CONVERSION
-// This function computes r such that if
-// N ~ geometric(prob=1-exp(-r dt)) and T ~ exponential(rate=R),
-// then E[N dt] = E[T]
-// i.e., the rate r for an Euler process that gives the same
-// expected waiting time as the exponential process it approximates.
-// In particular r -> R as dt -> 0.
-static R_INLINE double exp2geom_rate_correction (double R, double dt) {
-  return (dt > 0) ? log(1.0+R*dt)/dt : R;
-}
-
 // UTILITY FOR GAMMA WHITENOISE
 // This function draws a random increment of a gamma whitenoise process.
 // This will have expectation=dt and variance=(sigma^2*dt)
@@ -379,6 +187,17 @@
   for (i = 0; i < n; i++) xt[i] /= sum;
 }
 
+// UTILITY FOR EXPONENTIAL/GEOMETRIC RATE CONVERSION
+// This function computes r such that if
+// N ~ geometric(prob=1-exp(-r dt)) and T ~ exponential(rate=R),
+// then E[N dt] = E[T]
+// i.e., the rate r for an Euler process that gives the same
+// expected waiting time as the exponential process it approximates.
+// In particular r -> R as dt -> 0.
+static R_INLINE double exp2geom_rate_correction (double R, double dt) {
+  return (dt > 0) ? log(1.0+R*dt)/dt : R;
+}
+
 static R_INLINE double rbetabinom (double size, double prob, double theta) {
   return rbinom(size,rbeta(prob*theta,(1.0-prob)*theta));
 }
@@ -405,4 +224,188 @@
   return (give_log) ? f : exp(f);
 }
 
+// FACILITIES FOR EXTRACTING R OBJECTS FROM THE 'USERDATA' SLOT
+const SEXP get_pomp_userdata (const char *name);
+const int *get_pomp_userdata_int (const char *name);
+const double *get_pomp_userdata_double (const char *name);
+
+// THE FOLLOWING ARE C PROTOTYPES FOR COMPONENTS OF POMP MODELS.  
+// THEY CANNOT BE USED WITHIN C SNIPPETS.
+
+// prototype for stochastic simulation algorithm reaction-rate function, as used by "gillespie.sim":
+typedef double pomp_ssa_rate_fn(int j, double t, const double *x, const double *p,
+				int *stateindex, int *parindex, int *covindex,
+				int ncovar, double *covars);
+// Description:
+//  on input:
+// j          = integer specifying the number of the reaction whose rate is desired
+// t          = time at which the rates are to be evaluated
+// x          = vector of state variables
+// p          = vector of parameters
+// stateindex = pointer to vector of integers pointing to the states in 'x' in the order specified by 
+//                the 'statenames' argument of 'SSA.simulator'
+// parindex   = pointer to vector of integers pointing to the parameters in 'p' in the order specified by 
+//                the 'paramnames' argument of 'SSA.simulator'
+// covindex   = pointer to vector of integers pointing to the covariates in 'covars' in the order 
+//                specified by the 'covarnames' argument of 'SSA.simulator'
+// ncovars    = number of covariates
+// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
+//                from the covariate table supplied to 'SSA.simulator'
+//  returns the rate of the j-th reaction
+
+// prototype for one-step simulator, as used by "euler.sim" and "onestep.sim":
+typedef void pomp_onestep_sim(double *x, const double *p, 
+			      const int *stateindex, const int *parindex, const int *covindex,
+			      int ncovars, const double *covars,
+			      double t, double dt);
+// Description:
+//  on input:
+// x          = pointer to state vector
+// p          = pointer to parameter vector
+// stateindex = pointer to vector of integers pointing to the states in 'x' in the order specified by 
+//                the 'statenames' argument of 'euler.simulator'
+// parindex   = pointer to vector of integers pointing to the parameters in 'p' in the order specified by 
+//                the 'paramnames' argument of 'euler.simulator'
+// covindex   = pointer to vector of integers pointing to the covariates in 'covars' in the order 
+//                specified by the 'covarnames' argument of 'euler.simulator'
+// ncovars    = number of covariates
+// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
+//                from the covariate table supplied to 'euler.simulator'
+// t          = time at the beginning of the Euler step
+// dt         = size (duration) of the Euler step
+//  on output:
+// x          = contains the new state vector (i.e., at time t+dt)
+//
+// NB: There is no need to call GetRNGstate() or PutRNGstate() in the body of the user-defined function.
+//     The RNG is initialized before any call to this function, and the RNG state is written afterward.
+//     Inclusion of these calls in the user-defined function may result in significant slowdown.
+
+
+// PROTOTYPE FOR ONE-STEP LOG PROBABILITY DENSITY FUNCTION, AS USED BY "ONESTEP.DENS":
+typedef void pomp_onestep_pdf(double *f, 
+			      double *x1, double *x2, double t1, double t2, const double *p, 
+			      const int *stateindex, const int *parindex, const int *covindex,
+			      int ncovars, const double *covars);
+// Description:
+//  on input:
+// x1         = pointer to state vector at time t1
+// x2         = pointer to state vector at time t2
+// t1         = time corresponding to x1
+// t2         = time corresponding to x2
+// p          = pointer to parameter vector
+// stateindex = pointer to vector of integers indexing the states in 'x' in the order specified by 
+//                the 'statenames' argument of 'euler.density'
+// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
+//                the 'paramnames' argument of 'euler.density'
+// covindex   = pointer to vector of integers indexing the parameters in 'covar'' in the order specified by 
+//                the 'covarnames' argument of 'euler.density'
+// ncovars    = number of covariates
+// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
+//                from the covariate table supplied to 'euler.density'
+//  on output:
+// f          = pointer to the probability density (a single scalar)
+
+// prototype for deterministic skeleton evaluation
+typedef void pomp_skeleton (double *f, double *x, double *p, 
+			    int *stateindex, int *parindex, int *covindex, 
+			    int ncovars, double *covars, double t);
+
+// Description:
+//  on input:
+// x          = pointer to state vector at time t
+// p          = pointer to parameter vector
+// stateindex = pointer to vector of integers indexing the states in 'x' in the order specified by 
+//                the 'statenames' slot
+// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
+//                the 'paramnames' slot
+// covindex   = pointer to vector of integers indexing the parameters in 'covar'' in the order specified by 
+//                the 'covarnames' slot
+// ncovars    = number of covariates
+// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
+//                from the covariate table supplied to 'pomp.skeleton'
+// t          = time at the beginning of the Euler step
+//  on output:
+// f          = pointer to value of the map or vectorfield (a vector of the same length as 'x')
+
+// prototype for measurement model simulation
+typedef void pomp_measure_model_simulator (double *y, double *x, double *p, 
+					   int *obsindex, int *stateindex, int *parindex, int *covindex,
+					   int ncovars, double *covars, double t);
+// Description:
+//  on input:
+// x          = pointer to state vector at time t
+// p          = pointer to parameter vector
+// obsindex   = pointer to vector of integers indexing the variables in 'y' in the order specified by 
+//                the 'obsnames' slot
+// stateindex = pointer to vector of integers indexing the states in 'x' in the order specified by 
+//                the 'statenames' slot
+// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
+//                the 'paramnames' slot
+// covindex   = pointer to vector of integers indexing the parameters in 'covar'' in the order specified by 
+//                the 'covarnames' slot
+// ncovars    = number of covariates
+// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
+//                from the covariate table supplied to 'pomp.skeleton'
+// t          = time at the beginning of the Euler step
+//  on output:
+// y          = pointer to vector containing simulated observations (length = nobs = nrow(data))
+//
+// NB: There is no need to call GetRNGstate() or PutRNGstate() in the body of the user-defined function.
+//     The RNG is initialized before any call to this function, and the RNG state is written afterward.
+//     Inclusion of these calls in the user-defined function may result in significant slowdown.
+
+
+// prototype for measurement model density evaluator
+typedef void pomp_measure_model_density (double *lik, double *y, double *x, double *p, int give_log,
+					 int *obsindex, int *stateindex, int *parindex, int *covindex,
+					 int ncovars, double *covars, double t);
+// Description:
+//  on input:
+// y          = pointer to vector of observables at time t
+// x          = pointer to state vector at time t
+// p          = pointer to parameter vector
+// give_log   = should the log likelihood be returned?
+// obsindex   = pointer to vector of integers indexing the variables in 'y' in the order specified by 
+//                the 'obsnames' slot
+// stateindex = pointer to vector of integers indexing the states in 'x' in the order specified by 
+//                the 'statenames' slot
+// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
+//                the 'paramnames' slot
+// covindex   = pointer to vector of integers indexing the parameters in 'covar'' in the order specified by 
+//                the 'covarnames' slot
+// ncovars    = number of covariates
+// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
+//                from the covariate table supplied to 'pomp.skeleton'
+// t          = time at the beginning of the Euler step
+//  on output:
+// lik        = pointer to scalar containing (log) likelihood
+
+// prototype for prior simulation
+typedef void pomp_rprior (double *p, int *parindex);
+// Description:
+//  on input:
+// p          = pointer to parameter vector
+// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
+//                the 'paramnames' slot
+//  on output:
+// p          = pointer to vector containing draws from the prior
+//
+// NB: There is no need to call GetRNGstate() or PutRNGstate() in the body of the user-defined function.
+//     The RNG is initialized before any call to this function, and the RNG state is written afterward.
+//     Inclusion of these calls in the user-defined function may result in significant slowdown.
+
+// prototype for prior density evaluation
+typedef void pomp_dprior (double *lik, double *p, int give_log, int *parindex);
+// Description:
+//  on input:
+// p          = pointer to parameter vector
+// give_log   = should the log likelihood be returned?
+// parindex   = pointer to vector of integers indexing the parameters 
+//              in 'p' in the order specified by the 'paramnames' slot
+//  on output:
+// lik        = pointer to vector containing likelihoods
+
+// prototype for parameter transformation function.
+typedef void pomp_transform_fn (double *pt, double *p, int *parindex);
+
 #endif

Modified: pkg/pomp/src/pomp.h
===================================================================
--- pkg/pomp/src/pomp.h	2015-02-28 17:56:04 UTC (rev 1117)
+++ pkg/pomp/src/pomp.h	2015-03-01 03:40:12 UTC (rev 1118)
@@ -8,201 +8,9 @@
 #include <Rinternals.h>
 #include <R_ext/Rdynload.h>
 
-// FACILITIES FOR EXTRACTING R OBJECTS FROM THE 'USERDATA' SLOT
-const SEXP get_pomp_userdata (const char *name);
-const int *get_pomp_userdata_int (const char *name);
-const double *get_pomp_userdata_double (const char *name);
-
 // FACILITY FOR EVALUATING A SET OF PERIODIC BSPLINE BASIS FUNCTIONS
 void periodic_bspline_basis_eval (double x, double period, int degree, int nbasis, double *y);
 
-// PROTOTYPE FOR PARAMETER TRANSFORMATION FUNCTION.
-typedef void pomp_transform_fn (double *pt, double *p, int *parindex);
-
-// PROTOTYPE FOR STOCHASTIC SIMULATION ALGORITHM REACTION-RATE FUNCTION, AS USED BY "GILLESPIE.SIM":
-typedef double pomp_ssa_rate_fn(int j, double t, const double *x, const double *p,
-				int *stateindex, int *parindex, int *covindex,
-				int ncovar, double *covars);
-// Description:
-//  on input:
-// j          = integer specifying the number of the reaction whose rate is desired
-// t          = time at which the rates are to be evaluated
-// x          = vector of state variables
-// p          = vector of parameters
-// stateindex = pointer to vector of integers pointing to the states in 'x' in the order specified by 
-//                the 'statenames' argument of 'SSA.simulator'
-// parindex   = pointer to vector of integers pointing to the parameters in 'p' in the order specified by 
-//                the 'paramnames' argument of 'SSA.simulator'
-// covindex   = pointer to vector of integers pointing to the covariates in 'covars' in the order 
-//                specified by the 'covarnames' argument of 'SSA.simulator'
-// ncovars    = number of covariates
-// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
-//                from the covariate table supplied to 'SSA.simulator'
-//  returns the rate of the j-th reaction
-
-// PROTOTYPE FOR ONE-STEP SIMULATOR, AS USED BY "EULER.SIM" AND "ONESTEP.SIM":
-typedef void pomp_onestep_sim(double *x, const double *p, 
-			      const int *stateindex, const int *parindex, const int *covindex,
-			      int ncovars, const double *covars,
-			      double t, double dt);
-// Description:
-//  on input:
-// x          = pointer to state vector
-// p          = pointer to parameter vector
-// stateindex = pointer to vector of integers pointing to the states in 'x' in the order specified by 
-//                the 'statenames' argument of 'euler.simulator'
-// parindex   = pointer to vector of integers pointing to the parameters in 'p' in the order specified by 
-//                the 'paramnames' argument of 'euler.simulator'
-// covindex   = pointer to vector of integers pointing to the covariates in 'covars' in the order 
-//                specified by the 'covarnames' argument of 'euler.simulator'
-// ncovars    = number of covariates
-// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
-//                from the covariate table supplied to 'euler.simulator'
-// t          = time at the beginning of the Euler step
-// dt         = size (duration) of the Euler step
-//  on output:
-// x          = contains the new state vector (i.e., at time t+dt)
-//
-// NB: There is no need to call GetRNGstate() or PutRNGstate() in the body of the user-defined function.
-//     The RNG is initialized before any call to this function, and the RNG state is written afterward.
-//     Inclusion of these calls in the user-defined function may result in significant slowdown.
-
-
-// PROTOTYPE FOR ONE-STEP LOG PROBABILITY DENSITY FUNCTION, AS USED BY "ONESTEP.DENS":
-typedef void pomp_onestep_pdf(double *f, 
-			      double *x1, double *x2, double t1, double t2, const double *p, 
-			      const int *stateindex, const int *parindex, const int *covindex,
-			      int ncovars, const double *covars);
-// Description:
-//  on input:
-// x1         = pointer to state vector at time t1
-// x2         = pointer to state vector at time t2
-// t1         = time corresponding to x1
-// t2         = time corresponding to x2
-// p          = pointer to parameter vector
-// stateindex = pointer to vector of integers indexing the states in 'x' in the order specified by 
-//                the 'statenames' argument of 'euler.density'
-// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
-//                the 'paramnames' argument of 'euler.density'
-// covindex   = pointer to vector of integers indexing the parameters in 'covar'' in the order specified by 
-//                the 'covarnames' argument of 'euler.density'
-// ncovars    = number of covariates
-// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
-//                from the covariate table supplied to 'euler.density'
-//  on output:
-// f          = pointer to the probability density (a single scalar)
-
-// PROTOTYPE FOR DETERMINISTIC SKELETON EVALUATION
-typedef void pomp_skeleton (double *f, double *x, double *p, 
-			    int *stateindex, int *parindex, int *covindex, 
-			    int ncovars, double *covars, double t);
-
-// Description:
-//  on input:
-// x          = pointer to state vector at time t
-// p          = pointer to parameter vector
-// stateindex = pointer to vector of integers indexing the states in 'x' in the order specified by 
-//                the 'statenames' slot
-// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
-//                the 'paramnames' slot
-// covindex   = pointer to vector of integers indexing the parameters in 'covar'' in the order specified by 
-//                the 'covarnames' slot
-// ncovars    = number of covariates
-// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
-//                from the covariate table supplied to 'pomp.skeleton'
-// t          = time at the beginning of the Euler step
-//  on output:
-// f          = pointer to value of the map or vectorfield (a vector of the same length as 'x')
-
-// PROTOTYPE FOR MEASUREMENT MODEL SIMULATION
-typedef void pomp_measure_model_simulator (double *y, double *x, double *p, 
-					   int *obsindex, int *stateindex, int *parindex, int *covindex,
-					   int ncovars, double *covars, double t);
-// Description:
-//  on input:
-// x          = pointer to state vector at time t
-// p          = pointer to parameter vector
-// obsindex   = pointer to vector of integers indexing the variables in 'y' in the order specified by 
-//                the 'obsnames' slot
-// stateindex = pointer to vector of integers indexing the states in 'x' in the order specified by 
-//                the 'statenames' slot
-// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
-//                the 'paramnames' slot
-// covindex   = pointer to vector of integers indexing the parameters in 'covar'' in the order specified by 
-//                the 'covarnames' slot
-// ncovars    = number of covariates
-// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
-//                from the covariate table supplied to 'pomp.skeleton'
-// t          = time at the beginning of the Euler step
-//  on output:
-// y          = pointer to vector containing simulated observations (length = nobs = nrow(data))
-//
-// NB: There is no need to call GetRNGstate() or PutRNGstate() in the body of the user-defined function.
-//     The RNG is initialized before any call to this function, and the RNG state is written afterward.
-//     Inclusion of these calls in the user-defined function may result in significant slowdown.
-
-
-// PROTOTYPE FOR MEASUREMENT MODEL DENSITY EVALUATOR
-typedef void pomp_measure_model_density (double *lik, double *y, double *x, double *p, int give_log,
-					 int *obsindex, int *stateindex, int *parindex, int *covindex,
-					 int ncovars, double *covars, double t);
-// Description:
-//  on input:
-// y          = pointer to vector of observables at time t
-// x          = pointer to state vector at time t
-// p          = pointer to parameter vector
-// give_log   = should the log likelihood be returned?
-// obsindex   = pointer to vector of integers indexing the variables in 'y' in the order specified by 
-//                the 'obsnames' slot
-// stateindex = pointer to vector of integers indexing the states in 'x' in the order specified by 
-//                the 'statenames' slot
-// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
-//                the 'paramnames' slot
-// covindex   = pointer to vector of integers indexing the parameters in 'covar'' in the order specified by 
-//                the 'covarnames' slot
-// ncovars    = number of covariates
-// covars     = pointer to a vector containing the values of the covariates at time t, as interpolated 
-//                from the covariate table supplied to 'pomp.skeleton'
-// t          = time at the beginning of the Euler step
-//  on output:
-// lik        = pointer to scalar containing (log) likelihood
-
-// PROTOTYPE FOR PRIOR SIMULATION
-typedef void pomp_rprior (double *p, int *parindex);
-// Description:
-//  on input:
-// p          = pointer to parameter vector
-// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
-//                the 'paramnames' slot
-//  on output:
-// p          = pointer to vector containing draws from the prior
-//
-// NB: There is no need to call GetRNGstate() or PutRNGstate() in the body of the user-defined function.
-//     The RNG is initialized before any call to this function, and the RNG state is written afterward.
-//     Inclusion of these calls in the user-defined function may result in significant slowdown.
-
-// PROTOTYPE FOR PRIOR DENSITY EVALUATION
-typedef void pomp_dprior (double *lik, double *p, int give_log, int *parindex);
-// Description:
-//  on input:
-// p          = pointer to parameter vector
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/pomp -r 1118


More information about the pomp-commits mailing list