Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // [[Rcpp::export]]
- Rcpp::List DEoptim_impl(const arma::colvec & minbound, // user-defined lower bounds
- const arma::colvec & maxbound, // user-defined upper bounds
- SEXP fnS, // function to be optimized, either R or C++
- const Rcpp::List & control, // parameters
- SEXP rhoS) { // optional environment
- double VTR = Rcpp::as<double>(control["VTR"]); // value to reach
- int i_strategy = Rcpp::as<int>(control["strategy"]); // chooses DE-strategy
- int i_itermax = Rcpp::as<int>(control["itermax"]); // Maximum number of generations
- long l_nfeval = 0; // nb of function evals (NOT passed in)
- int i_D = Rcpp::as<int>(control["npar"]); // Dimension of parameter vector
- int i_NP = Rcpp::as<int>(control["NP"]); // Number of population members
- int i_storepopfrom = Rcpp::as<int>(control["storepopfrom"]) - 1; // When to start storing populations
- int i_storepopfreq = Rcpp::as<int>(control["storepopfreq"]); // How often to store populations
- int i_specinitialpop = Rcpp::as<int>(control["specinitialpop"]); // User-defined inital population
- double f_weight = Rcpp::as<double>(control["F"]); // stepsize
- double f_cross = Rcpp::as<double>(control["CR"]); // crossover probability
- int i_bs_flag = Rcpp::as<int>(control["bs"]); // Best of parent and child
- int i_trace = Rcpp::as<int>(control["trace"]); // Print progress?
- int i_check_winner = Rcpp::as<int>(control["checkWinner"]); // Re-evaluate best parameter vector?
- int i_av_winner = Rcpp::as<int>(control["avWinner"]); // Average
- double i_pPct = Rcpp::as<double>(control["p"]); // p to define the top 100p% best solutions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement