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

📄 myga.h

📁 基本遗传算法在求一个函数表达式的最大值应用!
💻 H
字号:
#ifndef MYGA
#define MYGA
//my codes
#include "parameter.h"
#include "population.h"
#include "dataNode.h"
#include <iostream>
#include <fstream>
extern MyParameter myparameter;

class MyGA{
private:
	int     stop_generation;   //终止代数
	void report(std::ofstream & outfile ,Population * pop,int gen);
protected:
	//
public:
	DataNode * nodes;          //记录每代最优数据
	MyGA(int gen = myparameter.stop_criteria);
	~MyGA();

	void run(std::ofstream & outfile,double pcro = myparameter.pcross);
};

#endif ///:~MYGA

⌨️ 快捷键说明

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