📄 myga.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 + -