[Rcpp-commits] r2326 - pkg/RcppDE/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Oct 17 00:25:00 CEST 2010


Author: edd
Date: 2010-10-17 00:24:59 +0200 (Sun, 17 Oct 2010)
New Revision: 2326

Modified:
   pkg/RcppDE/src/de4_0.cpp
Log:
undo parts of r2324 which was little too aggressive


Modified: pkg/RcppDE/src/de4_0.cpp
===================================================================
--- pkg/RcppDE/src/de4_0.cpp	2010-10-16 22:21:02 UTC (rev 2325)
+++ pkg/RcppDE/src/de4_0.cpp	2010-10-16 22:24:59 UTC (rev 2326)
@@ -96,7 +96,7 @@
 void devol(double VTR, double f_weight, double f_cross, int i_bs_flag,
            arma::rowvec & fa_minbound, arma::rowvec & fa_maxbound, SEXP fcall, SEXP rho, int i_trace,
            int i_strategy, int i_D, int i_NP, int i_itermax,
-           arma::mat & initialpop, int i_storepopfrom, int i_storepopfreq, 
+           arma::mat & initialpopm, int i_storepopfrom, int i_storepopfreq, 
            int i_specinitialpop, int i_check_winner, int i_av_winner,
            arma::mat &ta_popP, arma::mat &ta_oldP, arma::mat &ta_newP, 
 	   arma::rowvec & t_bestP, arma::rowvec & ta_popC, arma::rowvec & ta_oldC, arma::rowvec & ta_newC, 
@@ -116,6 +116,8 @@
     int i_xav, popcnt, bestacnt, same; 		// lazy cnters 
     double f_jitter, f_dither, t_bestitC, t_tmpC, tmp_best, tempC; 
     
+    arma::mat initialpop(i_NP, i_D); 
+
     int i_pbest;    				// vars for DE/current-to-p-best/1 
     int p_NP = round(i_pPct * i_NP);  		// choose at least two best solutions 
     p_NP = p_NP < 2 ? 2 : p_NP;



More information about the Rcpp-commits mailing list