[Pomp-commits] r911 - in pkg/pomp: . R inst/doc src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Mar 25 14:02:04 CET 2014
Author: kingaa
Date: 2014-03-25 14:02:03 +0100 (Tue, 25 Mar 2014)
New Revision: 911
Modified:
pkg/pomp/DESCRIPTION
pkg/pomp/R/abc.R
pkg/pomp/inst/doc/manual.pdf
pkg/pomp/src/SSA_wrapper.c
pkg/pomp/src/euler.c
pkg/pomp/src/rmeasure.c
pkg/pomp/src/simulate.c
pkg/pomp/src/trajectory.c
Log:
- make 'abc' class definition compatible with older versions of R
- remove unneeded duplication of 'gnsi' in some C codes
- oldest version of R against which package checked is 2.15.1
Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION 2014-03-23 13:34:01 UTC (rev 910)
+++ pkg/pomp/DESCRIPTION 2014-03-25 13:02:03 UTC (rev 911)
@@ -1,8 +1,8 @@
Package: pomp
Type: Package
Title: Statistical inference for partially observed Markov processes
-Version: 0.49-1
-Date: 2014-03-22
+Version: 0.49-2
+Date: 2014-03-25
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")),
@@ -18,7 +18,7 @@
)
URL: http://pomp.r-forge.r-project.org
Description: Inference methods for partially-observed Markov processes
-Depends: R(>= 2.14.1), stats, graphics, methods, mvtnorm, subplex, nloptr, deSolve
+Depends: R(>= 2.15.1), stats, graphics, methods, mvtnorm, subplex, nloptr, deSolve
License: GPL(>= 2)
LazyData: true
BuildVignettes: true
Modified: pkg/pomp/R/abc.R
===================================================================
--- pkg/pomp/R/abc.R 2014-03-23 13:34:01 UTC (rev 910)
+++ pkg/pomp/R/abc.R 2014-03-25 13:02:03 UTC (rev 911)
@@ -2,7 +2,7 @@
setClass(
'abc',
contains='pomp',
- slots=c(
+ representation=representation(
pars = 'character',
transform = 'logical',
Nabc = 'integer',
Modified: pkg/pomp/inst/doc/manual.pdf
===================================================================
(Binary files differ)
Modified: pkg/pomp/src/SSA_wrapper.c
===================================================================
--- pkg/pomp/src/SSA_wrapper.c 2014-03-23 13:34:01 UTC (rev 910)
+++ pkg/pomp/src/SSA_wrapper.c 2014-03-25 13:02:03 UTC (rev 911)
@@ -105,8 +105,6 @@
int *sidx, *pidx, *cidx, *zidx;
SEXP fn, Snames, Pnames, Cnames;
- PROTECT(gnsi = duplicate(gnsi)); nprotect++;
-
dim = INTEGER(GET_DIM(xstart)); nvar = dim[0]; nrep = dim[1];
dim = INTEGER(GET_DIM(params)); npar = dim[0];
dim = INTEGER(GET_DIM(covar)); covlen = dim[0]; covdim = dim[1];
@@ -118,7 +116,6 @@
PROTECT(Cnames = GET_COLNAMES(GET_DIMNAMES(covar))); nprotect++;
PROTECT(fn = pomp_fun_handler(func,gnsi,&use_native)); nprotect++;
- *(INTEGER(gnsi)) = 0;
if (use_native) {
RXR = (pomp_ssa_rate_fn *) R_ExternalPtrAddr(fn);
Modified: pkg/pomp/src/euler.c
===================================================================
--- pkg/pomp/src/euler.c 2014-03-23 13:34:01 UTC (rev 910)
+++ pkg/pomp/src/euler.c 2014-03-25 13:02:03 UTC (rev 911)
@@ -20,8 +20,6 @@
pomp_onestep_sim *ff = NULL;
int meth = *(INTEGER(AS_INTEGER(method))); // 0 = Euler, 1 = one-step, 2 = fixed step
- PROTECT(gnsi = duplicate(gnsi)); nprotect++;
-
{
int *dim;
dim = INTEGER(GET_DIM(xstart)); nvars = dim[0]; nreps = dim[1];
@@ -47,7 +45,6 @@
// extract user function
PROTECT(fn = pomp_fun_handler(func,gnsi,&mode)); nprotect++;
- *(INTEGER(gnsi)) = 0;
// set up
switch (mode) {
@@ -263,8 +260,6 @@
SEXP F;
int *pidx = 0, *sidx = 0, *cidx = 0;
- PROTECT(gnsi = duplicate(gnsi)); nprotect++;
-
{
int *dim;
dim = INTEGER(GET_DIM(x)); nvars = dim[0]; nreps = dim[1];
Modified: pkg/pomp/src/rmeasure.c
===================================================================
--- pkg/pomp/src/rmeasure.c 2014-03-23 13:34:01 UTC (rev 910)
+++ pkg/pomp/src/rmeasure.c 2014-03-25 13:02:03 UTC (rev 911)
@@ -22,7 +22,6 @@
struct lookup_table covariate_table;
pomp_measure_model_simulator *ff = NULL;
- PROTECT(gnsi = duplicate(gnsi)); nprotect++;
PROTECT(times = AS_NUMERIC(times)); nprotect++;
ntimes = length(times);
if (ntimes < 1)
@@ -67,7 +66,6 @@
// extract the user-defined function
PROTECT(fn = pomp_fun_handler(GET_SLOT(object,install("rmeasure")),gnsi,&mode)); nprotect++;
- *(INTEGER(gnsi)) = 0;
// extract 'userdata' as pairlist
PROTECT(fcall = VectorToPairList(GET_SLOT(object,install("userdata")))); nprotect++;
Modified: pkg/pomp/src/simulate.c
===================================================================
--- pkg/pomp/src/simulate.c 2014-03-23 13:34:01 UTC (rev 910)
+++ pkg/pomp/src/simulate.c 2014-03-25 13:02:03 UTC (rev 911)
@@ -5,9 +5,8 @@
#include "pomp_internal.h"
-SEXP simulation_computations (SEXP object, SEXP params, SEXP times, SEXP t0, SEXP nsim,
- SEXP obs, SEXP states,
- SEXP gnsi)
+SEXP simulation_computations (SEXP object, SEXP params, SEXP times, SEXP t0,
+ SEXP nsim, SEXP obs, SEXP states, SEXP gnsi)
{
int nprotect = 0;
SEXP xstart, x, y, alltimes, coef, yy, offset;
@@ -22,8 +21,6 @@
double *s, *t, *xs, *xt, *ys, *yt, *ps, *pt, tt;
int i, j, k, np, nx;
- PROTECT(gnsi = duplicate(gnsi)); nprotect++;
-
PROTECT(offset = NEW_INTEGER(1)); nprotect++;
*(INTEGER(offset)) = 1;
Modified: pkg/pomp/src/trajectory.c
===================================================================
--- pkg/pomp/src/trajectory.c 2014-03-23 13:34:01 UTC (rev 910)
+++ pkg/pomp/src/trajectory.c 2014-03-25 13:02:03 UTC (rev 911)
@@ -108,8 +108,6 @@
lookup_table covariate_table;
double deltat, t;
- PROTECT(gnsi = duplicate(gnsi)); nprotect++;
-
deltat = *(REAL(GET_SLOT(object,install("skelmap.delta.t"))));
t = *(REAL(AS_NUMERIC(t0)));
@@ -136,7 +134,6 @@
// extract user-defined function
PROTECT(fn = pomp_fun_handler(GET_SLOT(object,install("skeleton")),gnsi,&mode)); nprotect++;
- *(INTEGER(gnsi)) = 0;
// extract 'userdata' as pairlist
PROTECT(args = VectorToPairList(GET_SLOT(object,install("userdata")))); nprotect++;
@@ -257,11 +254,8 @@
int *dim;
int nvars, npars, nreps, ncovars;
- PROTECT(gnsi = duplicate(gnsi)); nprotect++;
-
// extract user-defined skeleton function
PROTECT(fn = pomp_fun_handler(GET_SLOT(object,install("skeleton")),gnsi,&mode)); nprotect++;
- *(INTEGER(gnsi)) = 0;
// extract 'userdata' as pairlist
PROTECT(args = VectorToPairList(GET_SLOT(object,install("userdata")))); nprotect++;
More information about the pomp-commits
mailing list