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

📄 runtest.cpp

📁 文化算法的实际应用
💻 CPP
字号:
#include "ca.h"

int main(int argc, char* argv[])
{
	int Gmax;
	float seed;
	string fileName;
	if (argc == 4) {
		Gmax = atoi(argv[1]);
		seed = atof(argv[2]);
		fileName = argv[3];
	}
	else {	
		Gmax = 1000;
		seed = 0.5;
		cout<<"The Max Number of the generations: "<<Gmax<<endl;
		//cin>>Gmax;
		cout<<"Key in seed of random (0..1): "<<seed<<endl;
		//cin>>seed;
		cout<<"Key in the name of the exit file: ";
		cin>>fileName;
	}

	CAEP::CA ca(true);
	ca.Run(Gmax, seed, fileName);
}

⌨️ 快捷键说明

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