⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme-gs.cc

📁 c++编写的并行拉马克遗传算法的程序。实现分析对接程序
💻 CC
字号:
//1.-------------------------------------------------------------------Individual *Genetic_Algorithm::selection(Population &solutions){   Individual *next_generation;#ifdef DEBUG   (void)fprintf(logFile, "gs.cc/Individual *Genetic_Algorithm::selection(Population &solutions)\n");#endif /* DEBUG */   next_generation = new Individual[solutions.num_individuals()];         			 //分配自由存储区内存,但没有施放 delete next_generation     set_worst(solutions);   switch(s_mode)   {      case Proportional:         selection_proportional(solutions, next_generation);         break;      case Tournament:         selection_tournament(solutions, next_generation);         break;      case Boltzmann:         (void)fprintf(logFile,"gs.cc/Unimplemented Selection Method - using proportional\n");         selection_proportional(solutions, next_generation);         break;      default:         (void)fprintf(logFile,"gs.cc/Unknown Selection Mode!\n");   }   return(next_generation);}//end 1.------------------------------------------------------------------------------------------//----------------------------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -