[Pomp-commits] r420 - pkg/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Nov 17 16:19:39 CET 2010
Author: kingaa
Date: 2010-11-17 16:19:38 +0100 (Wed, 17 Nov 2010)
New Revision: 420
Modified:
pkg/src/dmeasure.c
pkg/src/rmeasure.c
pkg/src/skeleton.c
Log:
- remove some redundant/unnecessary lines
Modified: pkg/src/dmeasure.c
===================================================================
--- pkg/src/dmeasure.c 2010-11-16 14:26:16 UTC (rev 419)
+++ pkg/src/dmeasure.c 2010-11-17 15:19:38 UTC (rev 420)
@@ -148,7 +148,6 @@
PROTECT(tcovar = GET_SLOT(object,install("tcovar"))); nprotect++;
PROTECT(covar = GET_SLOT(object,install("covar"))); nprotect++;
- PROTECT(Cnames = GET_COLNAMES(GET_DIMNAMES(covar))); nprotect++;
PROTECT(obsnames = GET_SLOT(object,install("obsnames"))); nprotect++;
PROTECT(statenames = GET_SLOT(object,install("statenames"))); nprotect++;
PROTECT(paramnames = GET_SLOT(object,install("paramnames"))); nprotect++;
Modified: pkg/src/rmeasure.c
===================================================================
--- pkg/src/rmeasure.c 2010-11-16 14:26:16 UTC (rev 419)
+++ pkg/src/rmeasure.c 2010-11-17 15:19:38 UTC (rev 420)
@@ -159,7 +159,6 @@
PROTECT(tcovar = GET_SLOT(object,install("tcovar"))); nprotect++;
PROTECT(covar = GET_SLOT(object,install("covar"))); nprotect++;
- PROTECT(Cnames = GET_COLNAMES(GET_DIMNAMES(covar))); nprotect++;
PROTECT(obsnames = GET_SLOT(object,install("obsnames"))); nprotect++;
PROTECT(statenames = GET_SLOT(object,install("statenames"))); nprotect++;
PROTECT(paramnames = GET_SLOT(object,install("paramnames"))); nprotect++;
Modified: pkg/src/skeleton.c
===================================================================
--- pkg/src/skeleton.c 2010-11-16 14:26:16 UTC (rev 419)
+++ pkg/src/skeleton.c 2010-11-17 15:19:38 UTC (rev 420)
@@ -134,32 +134,23 @@
ntimes = LENGTH(t);
PROTECT(dimX = GET_DIM(x)); nprotect++;
- if ((isNull(dimX)) || (LENGTH(dimX)!=3)) {
- UNPROTECT(nprotect);
+ if ((isNull(dimX)) || (LENGTH(dimX)!=3))
error("skeleton error: 'x' must be a rank-3 array");
- }
dim = INTEGER(dimX);
nvars = dim[0]; nreps = dim[1];
- if (ntimes != dim[2]) {
- UNPROTECT(nprotect);
+ if (ntimes != dim[2])
error("skeleton error: length of 't' and 3rd dimension of 'x' do not agree");
- }
PROTECT(dimP = GET_DIM(params)); nprotect++;
- if ((isNull(dimP)) || (LENGTH(dimP)!=2)) {
- UNPROTECT(nprotect);
+ if ((isNull(dimP)) || (LENGTH(dimP)!=2))
error("skeleton error: 'params' must be a rank-2 array");
- }
dim = INTEGER(dimP);
npars = dim[0];
- if (nreps != dim[1]) {
- UNPROTECT(nprotect);
+ if (nreps != dim[1])
error("skeleton error: 2nd dimensions of 'params' and 'x' do not agree");
- }
PROTECT(tcovar = GET_SLOT(object,install("tcovar"))); nprotect++;
PROTECT(covar = GET_SLOT(object,install("covar"))); nprotect++;
- PROTECT(Cnames = GET_COLNAMES(GET_DIMNAMES(covar))); nprotect++;
PROTECT(statenames = GET_SLOT(object,install("statenames"))); nprotect++;
PROTECT(paramnames = GET_SLOT(object,install("paramnames"))); nprotect++;
PROTECT(covarnames = GET_SLOT(object,install("covarnames"))); nprotect++;
More information about the pomp-commits
mailing list