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

📄 call_gs.cc

📁 c++编写的并行拉马克遗传算法的程序。实现分析对接程序
💻 CC
字号:
/********************************************************************     Call_gs:  Invokes a Global Searcher object on a randomly               generated population of solution to the docking                problem.				rsh 3/12/96********************************************************************/#include <iostream.h>#include "gs.h"#include "support.h"#include "eval.h"#include "hybrids.h"#ifdef sgi			// CC on the sgi doesn't invoke cc on *.c files   #include "constants.h"   #include "structs.h"#else   extern "C"   {      #include "constants.h"      #include "structs.h"   }#endifextern Eval evaluate;State call_gs(Global_Search *global_method, State now, unsigned int num_evals, unsigned int pop_size,              float xlo, float xhi, float ylo, float yhi, float zlo, float zhi, Molecule *mol){   int i;   evaluate.reset();   global_method->reset();   Population thisPop(pop_size);   for (i=0; i<pop_size; i++)   {      thisPop[i] = random_ind(now.ntor, double(xlo), double(xhi), double(ylo), double(yhi), double(zlo), double(zhi));      thisPop[i].mol = mol;   }   do   {      global_method->search(thisPop);   } while ((evaluate.evals() < num_evals) && (!global_method->terminate()));   thisPop.msort(3);   return( thisPop[0].state(now.ntor) );}

⌨️ 快捷键说明

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