亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? gachromosome.h

?? 遺傳算法做的排課系統(tǒng)
?? H
?? 第 1 頁 / 共 2 頁
字號:

#ifndef __GA_CHROMOSOME_H__
#define __GA_CHROMOSOME_H__

#include "..\ExportImport.h"
#include "..\CallConvention.h"
#include "..\Common\GaSmartPtr.h"
#include "..\Common\GaParameters.h"

namespace Population
{
	enum GaSortedGroupType;
	class GaPopulation;
} // Population

using namespace Common;
using namespace Population;

namespace Chromosome
{
	// Parameter for operations which are performed on chromosomes.
	class GaChromosomeParams : public GaParameters
	{

	protected:

		// Probability in percent that mutation will occure.
		float _mutationProbability;

		// Maximum size of chromosome's portion which will be mutated
		int _mutationSize;

		// If it is set to TRUE indicates that the only mutations which lead to improvment of fittness will be commited
		bool _improvingOnlyMutations;

		// Probability in percent that crossover will occure.
		float _crossoverProbability;

		// Number of points on which crossover operation will be performed.
		int _numberOfCrossoverPoints;

	public:

		// Initialize chromosome's parameters
		DLL_EXPORT
		GaChromosomeParams(float mutationProbability,
			int mutationSize,
			bool improvingOnlyMutations,
			float crossoverProbability,
			int numberOfCrossoverPoints);

		// Initialize chromosome's parameters with default values
		DLL_EXPORT
		GaChromosomeParams();

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

		// Sets probability in percent that mutation will occure.
		DLL_EXPORT
		void GACALL SetMutationProbability(float probability);

		// Gets probability in percent that mutation will occure.
		DLL_EXPORT
		float GACALL GetMutationProbability() const;

		// Sets maximum size of chromosome's portion which will be mutated
		DLL_EXPORT
		void GACALL SetMutationSize(int size);

		// Returns maximum size of chromosome's portion which will be mutated
		DLL_EXPORT
		int GetMutationSize() const;

		// If it is set to TRUE indicates that the only mutations which lead to improvment of fittness will be commited
		DLL_EXPORT
		void GACALL SetImprovingMutationsFlag(bool improvingOnly);

		// Returns TRUE if the only mutations which lead to improvment of fitness is commited.
		DLL_EXPORT
		bool GACALL GetImprovingMutationsFlag() const;

		// Sets probability in percent that crossover will occure.
		DLL_EXPORT
		void GACALL SetCrossoverProbability(float probability);

		// Gets probability in percent that crossover will occure.
		DLL_EXPORT
		float GACALL GetCrossoverProbability() const;

		// Sets number of points on which crossover operation will be performed.
		DLL_EXPORT
		void GACALL SetNumberOfCrossoverPoints(int numberOfPoints);

		// Gets number of points on which crossover operation will be performed.
		DLL_EXPORT
		int GACALL GetNumberOfCrossoverPoints() const;

	};// END CLASS DEFINITION GaChromosomeParams

	class GaChromosome;

	// Smart pointers to chromosome
	typedef GaSmartPtr<GaChromosome> GaChromosomePtr;
	typedef GaSmartPtr<const GaChromosome> GaChromosomeConstPtr;

	// Base class for all chromosomes.
	class GaChromosome
	{

	public:

		// Destructor
		virtual ~GaChromosome() { };

		// Performs crossover operation and make new chiled from this and another given chromosome,
		virtual GaChromosomePtr GACALL Crossover(GaChromosomePtr secondParent) const=0;

		// Mutation operation
		virtual void GACALL Mutation()=0;

		// Make new chromosome which is the exact copy of this chromosome
		virtual GaChromosomePtr GACALL MakeCopy(bool setupOnly) const=0;

		// Make new chromosome of this type but with random characteristic
		virtual GaChromosomePtr GACALL MakeNewFromPrototype() const=0;

		// Returns fitness of the chromosome
		virtual float GACALL GetFitness() const=0;

		// Compares fitnesses of two chromosomes. Returns:
		//  a, -1 if the fitness value of this chromosome is lower then the value of the given chromosome
		//  b.  0 if the fitness values of both chromosomes are equal
		//  c.  1 if the fitness value of this chromosome is greater then the value of the given chromosome
		virtual int GACALL CompareFitnesses(GaChromosomePtr c) const=0;

		// Compares fitnesses of two chromosomes. Returns:
		//  a, -1 if the fitness value of this chromosome is lower then the given value
		//  b.  0 if the fitness values of both chromosomes are equal
		//  c.  1 if the fitness value of this chromosome is greater then the given value
		virtual int GACALL CompareFitnesses(float c) const=0;

		// Refresh fitness value of chromosome
		virtual void GACALL RefreshFitness()=0;

		// Returns algorithm's parameters of chromosome
		virtual const GaChromosomeParams& GACALL GetParameters() const=0;

		// Sets algorithm's parameters of chromosome
		virtual void GACALL SetParameters(GaChromosomeParams* p)=0;

		// Returns size of chromosome's code
		virtual int GACALL GetCodeSize() const=0;

		// Copy data and setup from given source chromosome
		virtual GaChromosome& GACALL operator =(const GaChromosome& rhs)=0;

		// Compares two chromosomes and returns how much are they simular in percent
		virtual float GACALL operator ==(const GaChromosome& c) const=0;

	protected:

		// Calculate the fitness of chromosome
		virtual float GACALL CalculateFitness() const=0;

	};// END CLASS DEFINITION GaChromosome

	class GaFitnessComparator;

	// Manages chromosome's scaled fitness value
	class GaScaledChromosome
	{
		DEFINE_SYNC_CLASS

	private:

		// Scaled fitness of the chromsome
		float _scaledFitness;

		// Population in which this chromosome is located
		GaPopulation* _population;

		// Pointer to the chromsome
		GaChromosomePtr _chromosome;

		// Group to which this chromosome belongs
		GaSortedGroupType _groups;

		// Index of chromosome in population
		int _index;

	public:

		// Initialization of scaled value
		DLL_EXPORT
		GaScaledChromosome(GaChromosomePtr chromosome,
			GaPopulation* population,
			int index);

		// Default constructor
		DLL_EXPORT
		GaScaledChromosome(GaPopulation* population);

		// Returns pointer to chromosome
		DLL_EXPORT
		GaChromosomePtr GACALL GetChromosome() const;

		// Sets pointer to chromosome
		DLL_EXPORT
		void GACALL SetChromosome(GaChromosomePtr chromosome);

		// Returns scaled fitness value
		DLL_EXPORT
		float GACALL GetScaledFitness() const;

		// Sets scaled fitness value
		DLL_EXPORT
		void GACALL SetScaledFitness(float fitness);

		// Returns fitness value (scaled or non scaled fitness) for comparation
		DLL_EXPORT
		float GACALL GetFitnessForComparation() const;

		// Rescale scaled fitness value
		DLL_EXPORT
		void GACALL Rescale();

		// Compares fitnesses of two chromosomes. Returns:
		//  a, -1 if the fitness value of this chromosome is lower then the value of the given chromosome
		//  b.  0 if the fitness values of both chromosomes are equal
		//  c.  1 if the fitness value of this chromosome is greater then the value of the given chromosome
		DLL_EXPORT
		int GACALL CompareFitnesses(const GaScaledChromosome& c) const;

		// Compares fitnesses of two chromosomes. Returns:
		//  a, -1 if the fitness value of this chromosome is lower then the given value
		//  b.  0 if the fitness values of both chromosomes are equal
		//  c.  1 if the fitness value of this chromosome is greater then the given value
		DLL_EXPORT
		int GACALL CompareFitnesses(float c) const;

		// Removes chromosome from desired groups
		DLL_EXPORT
		void GACALL ClearGroupFlags(GaSortedGroupType groups);

		// Sets flag that chromosome belongs to specified groups
		DLL_EXPORT
		void GACALL SetGroupFlags(GaSortedGroupType groups);

		// Returns TRUE if the chromosome belongs to specified groups
		DLL_EXPORT
		bool GACALL GetGroupFlag(GaSortedGroupType groups,
			bool all = false);

		// Sets groups to which this chromosome belongs
		DLL_EXPORT
		void GACALL SetGroups(GaSortedGroupType groups);

		// Returns groups to which this chromosome belongs
		DLL_EXPORT
		GaSortedGroupType GACALL GetGroups() const;

		// Sets index of chromosome in pupulation
		DLL_EXPORT
		void GACALL SetIndex(int index);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品一线二线三线| 日本中文在线一区| 亚洲成人av一区| 成人在线视频首页| 在线观看av不卡| 欧美激情艳妇裸体舞| 日韩高清电影一区| 在线免费观看不卡av| 中文字幕欧美激情一区| 老司机精品视频线观看86| 欧美视频你懂的| 亚洲美女淫视频| 波多野结衣中文字幕一区 | 久久99精品久久久| 欧美三级欧美一级| 国产日韩影视精品| 精品综合久久久久久8888| 在线不卡的av| 无码av免费一区二区三区试看| 91欧美一区二区| 国产精品久久久久久久裸模| 国产成人免费视频精品含羞草妖精 | 国产一区二区精品久久91| 欧美三电影在线| 一区二区三区在线免费播放| 一本大道久久a久久精品综合| 国产欧美一区二区三区鸳鸯浴 | 亚洲精品一区二区在线观看| 麻豆精品一区二区三区| 欧美一级二级三级乱码| 日韩av电影天堂| 欧美丰满少妇xxxbbb| 亚洲aⅴ怡春院| 欧美日韩国产高清一区二区 | 日韩av在线免费观看不卡| 这里只有精品视频在线观看| 五月婷婷综合网| 日韩三级在线免费观看| 狠狠色综合播放一区二区| 久久网这里都是精品| 国产成a人亚洲精品| 国产精品免费观看视频| 波多野结衣中文一区| 亚洲精品免费在线观看| 欧洲视频一区二区| 美腿丝袜亚洲一区| 国产婷婷色一区二区三区四区| 国产精品影视天天线| 成人欧美一区二区三区小说 | 秋霞午夜av一区二区三区| 日韩欧美亚洲另类制服综合在线| 极品尤物av久久免费看| 久久精品一区蜜桃臀影院| 成人av网站免费| 亚洲精品高清在线| 精品免费日韩av| 国产一区二三区好的| 欧美国产日韩精品免费观看| 色婷婷av一区二区三区gif| 日本美女一区二区三区视频| 久久蜜桃av一区二区天堂 | 国产91精品一区二区麻豆亚洲| 国产亚洲综合性久久久影院| 99re6这里只有精品视频在线观看| 一二三区精品福利视频| 日韩精品一区二区三区视频| 国产盗摄女厕一区二区三区| 亚洲日本成人在线观看| 精品免费国产一区二区三区四区| 成人精品国产一区二区4080| 亚洲不卡一区二区三区| 国产日韩欧美电影| 欧美日韩国产成人在线91| 国产精品自拍在线| 亚洲国产精品一区二区尤物区| 久久综合99re88久久爱| 欧美性色黄大片手机版| 高清在线观看日韩| 欧美aaaaaa午夜精品| 亚洲人成精品久久久久久| 精品国产网站在线观看| 欧美视频一区二区三区四区| 国产不卡视频一区二区三区| 日本vs亚洲vs韩国一区三区| 一区二区国产视频| 国产三级欧美三级日产三级99| 欧美日韩1区2区| 99精品黄色片免费大全| 国产99精品国产| 老司机精品视频线观看86| 亚洲图片欧美一区| 亚洲欧美成aⅴ人在线观看| 久久夜色精品国产噜噜av| 欧美一卡二卡三卡| 91黄色免费版| 91丨porny丨国产| 成人午夜电影小说| 国产精品2024| 蜜桃av噜噜一区| 青娱乐精品视频| 亚洲国产精品久久艾草纯爱| 亚洲视频电影在线| 中文字幕一区二区三区色视频| 精品电影一区二区三区| 欧美一区二区三区在线| 欧美一区二区久久| 日韩视频一区在线观看| 日韩一区二区在线播放| 欧美一区二区成人6969| 7777精品伊人久久久大香线蕉最新版| 一本久道中文字幕精品亚洲嫩| 99在线精品免费| 色妞www精品视频| 色琪琪一区二区三区亚洲区| 色天使色偷偷av一区二区| 欧洲精品在线观看| 欧美乱妇23p| 日韩一级在线观看| 精品久久久久久久久久久久久久久| 日韩亚洲欧美一区二区三区| 日韩欧美在线123| 久久久久国产精品厨房| 国产精品不卡一区二区三区| 亚洲色图另类专区| 性久久久久久久久| 美女免费视频一区| 国产一区二区视频在线播放| 国产成人免费9x9x人网站视频| 成人激情图片网| 日本精品视频一区二区| 在线91免费看| 日本一区二区免费在线观看视频 | 国产精品少妇自拍| 综合久久给合久久狠狠狠97色| 亚洲精品成人在线| 热久久久久久久| 丁香五精品蜜臀久久久久99网站 | 91视频在线观看| 精品视频免费在线| 精品国产成人系列| 亚洲三级在线免费观看| 三级在线观看一区二区| 国产成人一区二区精品非洲| 97超碰欧美中文字幕| 这里只有精品电影| 欧美国产日韩在线观看| 亚洲成人av在线电影| 国产电影一区在线| 欧美精品丝袜中出| 国产三级精品三级在线专区| 亚洲va欧美va人人爽| 国产呦萝稀缺另类资源| 日本韩国欧美一区| 久久久久久久一区| 亚洲五月六月丁香激情| 国产成人久久精品77777最新版本| 欧美少妇xxx| 欧美国产日韩在线观看| 日韩中文字幕不卡| 99精品视频一区| 久久男人中文字幕资源站| 午夜国产精品影院在线观看| 成人精品高清在线| 欧美电影免费观看高清完整版在线观看| 国产精品美日韩| 美女一区二区在线观看| 在线观看一区二区视频| 国产日韩欧美一区二区三区乱码| 日韩中文字幕1| 欧洲色大大久久| 国产精品国模大尺度视频| 久国产精品韩国三级视频| 欧美日韩高清一区二区三区| 国产精品久久久久久久久久免费看 | 成人sese在线| 久久综合久久综合久久| 免费成人在线网站| 欧美在线啊v一区| 国产精品乱码人人做人人爱| 蜜桃久久久久久久| 欧美精品黑人性xxxx| 亚洲一二三级电影| 91精品福利视频| 一区精品在线播放| 不卡的av电影在线观看| 国产日韩精品一区| 看电影不卡的网站| 日韩一区二区三区三四区视频在线观看| 夜夜嗨av一区二区三区中文字幕| 99re热这里只有精品视频| 国产精品久久久久久久岛一牛影视| 国产乱人伦偷精品视频不卡| 久久婷婷色综合| 国产精品一区在线观看乱码| 2014亚洲片线观看视频免费| 国产在线视频一区二区三区| 精品国产伦一区二区三区观看体验| 蜜桃视频一区二区三区在线观看| 欧美一区二区三区视频在线 | 美美哒免费高清在线观看视频一区二区|