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

📄 gareplaceelitismparams.h

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

#ifndef __GA_REPLACE_ELITISM_PARAMS__
#define __GA_REPLACE_ELITISM_PARAMS__

#include "..\GaReplacement.h"

using namespace Population;

namespace Population
{
	namespace ReplacementOperations
	{

		// Parameters for replacement methods which can remove the best chromosomes from population
		class GaReplaceElitismParams : public GaReplacementParams
		{

		private:

			// Number of the best chromosome which will certainly surivive to tje next generation
			int _elitism;

		public:

			// Initialization of the parameters
			DLL_EXPORT
			GaReplaceElitismParams(int replacementSize,
				int elitism);

			// Initialization of the parameters with default values
			DLL_EXPORT
			GaReplaceElitismParams();

			// Virtual copy constructor
			DLL_EXPORT
			virtual GaParameters* GACALL Clone() const;

			// Returns number of the best chromosome which will certainly surivive to the next generation
			DLL_EXPORT
			int GACALL GetElitism() const;

			// Sets number of the best chromosome which will certainly surivive to the next generation
			DLL_EXPORT
			void GACALL SetElitism(int elitism);

		};// END CLASS DEFINITION GaReplaceElitismParams

	} // ReplacementOperations
} // Population

#endif // __GA_REPLACE_ELITISM_PARAMS__

⌨️ 快捷键说明

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