gastopcriteria.h
来自「遗传算法做的排课系统」· C头文件 代码 · 共 40 行
H
40 行
#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 + =
减小字号Ctrl + -
显示快捷键?