popbasesolver.h

来自「遗传算法vc++语言版源程序,台湾大学编写。」· C头文件 代码 · 共 40 行

H
40
字号
#ifndef _POPBASESOLVER_
#define _POPBASESOLVER_

#include <vector>
using namespace std;
#include "UOFSolver.h"
#include "CommonUtility.h"

enum POP_OPT_TYPE
{
	MINIMIZE, MAXIMIZE
};

class PopSolution;

class PopBaseSolver : public UOFSolver
{
public: // basic interface
	UOFIdentity("PopBaseSolver class",1);

	PopBaseSolver(PopSolution&,size_t);
	~PopBaseSolver();

	size_t	GetIteration(){return m_iter;}
	POP_OPT_TYPE	GetOptType(){return m_optType;}
	void			SetOptType(POP_OPT_TYPE ot){m_optType = ot;}

public:
	vector<PopSolution*>	m_Pop;
	virtual void			PrintSelf(ostream&){}

public:
	size_t					GetPopSize(){return m_Pop.size();}
	size_t					m_iter;
	POP_OPT_TYPE			m_optType;
};

#endif

⌨️ 快捷键说明

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