[Deoptim-commits] r114 - pkg/DEoptim/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 14 14:15:25 CEST 2013
Author: bodanker
Date: 2013-08-14 14:15:24 +0200 (Wed, 14 Aug 2013)
New Revision: 114
Modified:
pkg/DEoptim/src/de4_0.c
Log:
- ensure lower and upper are REAL
Modified: pkg/DEoptim/src/de4_0.c
===================================================================
--- pkg/DEoptim/src/de4_0.c 2013-04-20 06:13:09 UTC (rev 113)
+++ pkg/DEoptim/src/de4_0.c 2013-08-14 12:15:24 UTC (rev 114)
@@ -107,6 +107,9 @@
double *gd_bestmemit = REAL(sexp_bestmemit);
double *gd_bestvalit = REAL(sexp_bestvalit);
+ /* ensure lower and upper are double */
+ if(TYPEOF(lower) != REALSXP) PROTECT(lower = coerceVector(lower, REALSXP)); P++;
+ if(TYPEOF(upper) != REALSXP) PROTECT(upper = coerceVector(upper, REALSXP)); P++;
double *d_lower = REAL(lower);
double *d_upper = REAL(upper);
More information about the Deoptim-commits
mailing list