📄 parameter.hpp
字号:
// -*- c++ -*-//// File: parameter.hpp//// Description: definition of parameters for the ECGA.//// Author: Fernando Lobo//// Date: June/1999//// Extended to deal with chi-ary problems by Luis de la Ossa// GCC 3.4 and 4 series compliance by Kumara Sastry //// Date: March/2006#ifndef _parameter_hpp#define _parameter_hppclass parameter { public: static double seed; // seed for random number generator static int lchrom; // chromosome length static int popsize; // population size static double pcross; // probability of crossover static int tournament_size; // tournament size static int stop_criteria; // stopping criteria for the algorithm static double stop_criteria_arg; // stop criteria argument (ex: maxgens= x) static bool learn_MPM; // on = learns linkage, off = compact GA static int *ranges; // range of values that can take each gene static bool report_pop; static bool report_string; static bool report_fitness; static bool report_MPM;};//// constant definitions for stopping criterias//const int ALLELE_CONVERGENCE = 60;const int MAX_GENERATIONS = 61;#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -