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

📄 gastopcriteria.h

📁 遗传算法做的排课系统
💻 H
字号:

#ifndef __GA_STOP_CRITERIA_H__
#define __GA_STOP_CRITERIA_H__

#include "..\CallConvention.h"
#include "..\Common\GaParameters.h"
#include "..\Common\GaOperation.h"

using namespace Common;

namespace Algorithm
{
	class GaAlgorithm;

	// Base abstract class of all parameters for stop criteria method.
	class GaStopCriteriaParams : public GaParameters { }; // END CLASS DEFINITION GaStopCriteriaParams

	// Interface for method which examins the state of an algorithm to see if stopping condition is reached.
	class GaStopCriteria : public GaOperation
	{

	public:

		// Compares the state of the algorithm against given stopping condition and given paremeters,
		// and returns TRUE if that condition is reached.
		virtual bool GACALL Evaluate(const GaAlgorithm& algorithm,
						const GaStopCriteriaParams& parameters) const=0;

	};// END CLASS DEFINITION GaStopCriteria

	// Stop criteria and its parameters
	typedef GaOperationParametersPair<GaStopCriteria, GaStopCriteriaParams> GaStopCriteriaPair;

	// Catalogue of stop criterias for genetic algorithms
	typedef GaCatalogue<GaStopCriteria> GaStopCriteriaCatalogue;

} // Algorithm

#endif // __GA_STOP_CRITERIA_H__

⌨️ 快捷键说明

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