[Pomp-commits] r1207 - in pkg/pomp: R src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jun 17 14:56:36 CEST 2015


Author: kingaa
Date: 2015-06-17 14:56:36 +0200 (Wed, 17 Jun 2015)
New Revision: 1207

Modified:
   pkg/pomp/R/abc.R
   pkg/pomp/R/bsmc2.R
   pkg/pomp/R/mif2.R
   pkg/pomp/R/pfilter.R
   pkg/pomp/R/profile-design.R
   pkg/pomp/R/sannbox.R
   pkg/pomp/R/simulate-pomp.R
   pkg/pomp/src/cholmodel.c
   pkg/pomp/src/dprior.c
   pkg/pomp/src/initstate.c
   pkg/pomp/src/pomp_fun.c
   pkg/pomp/src/rprior.c
   pkg/pomp/src/simulate.c
Log:
- minor edits to purge unused variables and obviate certain compiler warnings

Modified: pkg/pomp/R/abc.R
===================================================================
--- pkg/pomp/R/abc.R	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/R/abc.R	2015-06-17 12:56:36 UTC (rev 1207)
@@ -65,8 +65,6 @@
   if (!all(sapply(probes,function(f)length(formals(f))==1)))
     stop("each probe must be a function of a single argument")
 
-  ntimes <- length(time(object))
-  
   if (verbose) {
     cat("performing",Nabc,"ABC iteration(s)\n")
   }

Modified: pkg/pomp/R/bsmc2.R
===================================================================
--- pkg/pomp/R/bsmc2.R	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/R/bsmc2.R	2015-06-17 12:56:36 UTC (rev 1207)
@@ -82,7 +82,6 @@
                          params
                        }
                        )
-  statenames <- rownames(xstart)
   nvars <- nrow(xstart)
   ptsi.for <- FALSE
   

Modified: pkg/pomp/R/mif2.R
===================================================================
--- pkg/pomp/R/mif2.R	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/R/mif2.R	2015-06-17 12:56:36 UTC (rev 1207)
@@ -59,10 +59,6 @@
   times <- time(object,t0=TRUE)
   ntimes <- length(times)-1
 
-  paramnames <- rownames(params)
-  npars <- nrow(params)
-  rwnames <- rownames(rw.sd)
-
   loglik <- rep(NA,ntimes)
   eff.sample.size <- numeric(ntimes)
   nfail <- 0

Modified: pkg/pomp/R/pfilter.R
===================================================================
--- pkg/pomp/R/pfilter.R	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/R/pfilter.R	2015-06-17 12:56:36 UTC (rev 1207)
@@ -46,7 +46,7 @@
 
   pompLoad(object)
 
-  ptsi.inv <- ptsi.for <- gnsi.rproc <- gnsi.dmeas <- as.logical(.getnativesymbolinfo)
+  ptsi.for <- gnsi.rproc <- gnsi.dmeas <- as.logical(.getnativesymbolinfo)
   mif2 <- as.logical(.mif2)
   transform <- as.logical(.transform)
   

Modified: pkg/pomp/R/profile-design.R
===================================================================
--- pkg/pomp/R/profile-design.R	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/R/profile-design.R	2015-06-17 12:56:36 UTC (rev 1207)
@@ -7,7 +7,6 @@
   ovars <- names(lower)
   if (!all(sort(ovars)==sort(names(upper))))
     stop(sQuote("profileDesign"),": names of ",sQuote("lower")," and ",sQuote("upper")," must match!")
-  vars <- ovars[!(ovars%in%pvars)]
   x <- expand.grid(...,stringsAsFactors=stringsAsFactors)
   y <- sobolDesign(lower=lower,upper=upper,nseq=nprof)
   z <- vector(mode='list',length=nrow(x)*nprof)

Modified: pkg/pomp/R/sannbox.R
===================================================================
--- pkg/pomp/R/sannbox.R	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/R/sannbox.R	2015-06-17 12:56:36 UTC (rev 1207)
@@ -57,7 +57,6 @@
     control$upper <- rep(control$upper,npar)
 
   ## initialization for the algorithm
-  laststep <- 0
   thetabest <- thetacurrent <- par
   ycurrent <- fn(thetacurrent,...)/control$fnscale
   if (!is.finite(ycurrent)) ycurrent <- big

Modified: pkg/pomp/R/simulate-pomp.R
===================================================================
--- pkg/pomp/R/simulate-pomp.R	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/R/simulate-pomp.R	2015-06-17 12:56:36 UTC (rev 1207)
@@ -68,7 +68,6 @@
     if (obs && states) {
       dm <- dim(retval$obs)
       nsim <- dm[2L]
-      ntimes <- dm[3L]
       nm <- rownames(retval$obs)
       dim(retval$obs) <- c(dm[1L],prod(dm[-1L]))
       rownames(retval$obs) <- nm
@@ -86,7 +85,6 @@
     } else if (obs || states) {
       dm <- dim(retval)
       nsim <- dm[2L]
-      ntimes <- dm[3L]
       nm <- rownames(retval)
       dim(retval) <- c(dm[1L],prod(dm[-1L]))
       rownames(retval) <- nm

Modified: pkg/pomp/src/cholmodel.c
===================================================================
--- pkg/pomp/src/cholmodel.c	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/src/cholmodel.c	2015-06-17 12:56:36 UTC (rev 1207)
@@ -40,7 +40,7 @@
 
 void _cholmodel_untrans (double *pt, double *p, int *parindex) 
 {
-  int k, nrstage = (int) NRSTAGE;
+  int nrstage = (int) NRSTAGE;
   pt[parindex[0]] = log(TAU);
   pt[parindex[1]] = log(GAMMA);
   pt[parindex[2]] = log(EPS);
@@ -56,7 +56,7 @@
  
 void _cholmodel_trans (double *pt, double *p, int *parindex) 
 {
-  int k, nrstage = (int) NRSTAGE;
+  int nrstage = (int) NRSTAGE;
   pt[parindex[0]] = exp(TAU);
   pt[parindex[1]] = exp(GAMMA);
   pt[parindex[2]] = exp(EPS);

Modified: pkg/pomp/src/dprior.c
===================================================================
--- pkg/pomp/src/dprior.c	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/src/dprior.c	2015-06-17 12:56:36 UTC (rev 1207)
@@ -42,8 +42,7 @@
   case Rfun:			// use R function
 
     {
-      SEXP pvec, rho, ans;
-      int use_names = 0;
+      SEXP pvec, rho;
       double *pp, *ps, *pt;
       int j;
 

Modified: pkg/pomp/src/initstate.c
===================================================================
--- pkg/pomp/src/initstate.c	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/src/initstate.c	2015-06-17 12:56:36 UTC (rev 1207)
@@ -103,7 +103,7 @@
     case Rfun:			// use R function
 
       {
-	SEXP par, rho, x1, x2, mindex;
+	SEXP par, rho, x1, x2;
 	double *p, *pp, *xp, *xt;
 	int j, *midx;
 

Modified: pkg/pomp/src/pomp_fun.c
===================================================================
--- pkg/pomp/src/pomp_fun.c	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/src/pomp_fun.c	2015-06-17 12:56:36 UTC (rev 1207)
@@ -68,7 +68,7 @@
 
     break;
 
-  default:
+  case undef: default:
     error("operation cannot be completed: some needed function has not been specified");
     break;
   }

Modified: pkg/pomp/src/rprior.c
===================================================================
--- pkg/pomp/src/rprior.c	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/src/rprior.c	2015-06-17 12:56:36 UTC (rev 1207)
@@ -109,7 +109,7 @@
   case native:			// use native routine
 
     {
-      double *pp, *ps;
+      double *ps;
       int *pidx = 0;
       pomp_rprior *ff = NULL;
       int j;

Modified: pkg/pomp/src/simulate.c
===================================================================
--- pkg/pomp/src/simulate.c	2015-06-15 19:31:53 UTC (rev 1206)
+++ pkg/pomp/src/simulate.c	2015-06-17 12:56:36 UTC (rev 1207)
@@ -14,7 +14,6 @@
   SEXP ans, ans_names;
   SEXP po, popo;
   SEXP statenames, paramnames, obsnames, statedim, obsdim;
-  SEXP rmeas;
   int nsims, nparsets, nreps, npars, nvars, ntimes, nobs;
   int qobs, qstates;
   int *dim, dims[3];



More information about the pomp-commits mailing list