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

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

?? operation.h

?? 遺傳算法的四個源程序和源代碼
?? H
字號:

/*! \file Operation.h
    \brief This file declares interface for genetic operations and parameters. It also delcares and implements datatype which store operation-parameters pair. 
*/

/*
 * 
 * website: http://www.coolsoft-sd.com/
 * contact: support@coolsoft-sd.com
 *
 */

/*
 * Genetic Algorithm Library
 * Copyright (C) 2007-2008 Coolsoft Software Development
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 */

#ifndef __GA_OPERATION_H__
#define __GA_OPERATION_H__

#include "Platform.h"

namespace Common
{
	/// <summary>Interface for parameters of genetic operations.</summary>
	class GaParameters
	{

	public:

		/// <summary>It is used to allocate memory, create copy of parameters' object on heap.</summary>
		/// <remarks>Caller is responsible for allocated memory, freeing of new object should be done by <c>delete</c> keyword.
		/// User-defined parameters classes inherited by built-in classes should override this method to perform custom copying.</remarks>
		/// <returns>Returns pointer to newly created object.</returns>
		virtual GaParameters* GACALL Clone() const=0;

	};// END CLASS DEFINITION GaParameters

	/// <summary>Interface for genetic operations.</summary>
	class GaOperation
	{

	public:
		
		/// <summary>Allocates memory and makes corresponding operation's parameters object on heap.</summary>
		/// <remarks>Caller is responsible for allocated memory, freeing of new object should be done by delete keyword. 
		/// User-defined operation classes inherited by built-in classes should override this method to perform creation
		/// of custom operation's parameters objects.</summary>
		/// <returns>Returns pointer to newly created object.</returns>
		virtual GaParameters* GACALL MakeParameters() const=0;

		/// <summary>Method checks correctness of parameters.</summary>
		/// <param name="parameters">constant reference to parameters' object on which correctness checking is performed.</param>
		/// <returns>Returns <c>true</c> if parameters are correct, otherwise it returns <c>false</c>.</returns>
		virtual bool GACALL CheckParameters(const GaParameters& parameters) const=0;

	};// END CLASS DEFINITION GaOperation

	/// <summary>This template class is used for storing genetic operations and their parameters.
	/// This class has no built-in synchronizator, so <c>LOCK_OBJECT</c> and <c>LOCK_THIS_OBJECT</c> macros cannot be used with instances of this class.
	///
	/// No public or private methods are thread-safe.</summary>
	/// <param name="OTYPE">Type of operation.</param>
	/// <param name="PTYPE">Type of parameters.</param>
	template <typename OTYPE, typename PTYPE>
	class GaOperationParametersPair
	{

	private:

		/// <summary>Pointer to operation's object.</summary>
		OTYPE* _operation;

		/// <summary>Pointer to parameters' object</summary>
		PTYPE* _parameters;

	public:

		/// <summary>This constructor initializes operation's and parameters' pointers with user-defined values.
		/// Parameter's object is cloned and pointer to the new object is stored in the pair.</summary>
		/// <param name="operation">pointer to operation's object</param>
		/// <param name="parameters">pointer to the object of operation's parameters</param>
		GaOperationParametersPair(OTYPE* operation,
			PTYPE& parameters) : _operation(operation) { _parameters = &parameters ? (PTYPE*)parameters.Clone() : 0; }

		/// <summary>This is copy constructor. It copies pointer to used operation int new pair object and clones parameters' object and stores it.</summary>
		/// <param name="rhs">reference to pair object which is being copied.</param>
		GaOperationParametersPair(const GaOperationParametersPair& rhs) : _operation(rhs._operation)
			{ _parameters = rhs._parameters ? (PTYPE*)rhs._parameters->Clone() : 0; }

		/// <summary>This constructor initializes operation's and parameters' pointers with <c>NULL</c> values. </summary>
		GaOperationParametersPair() : _operation(0),
			_parameters(0) { };

		/// <summary>Destructor frees memory allocated by parameters' object which was made by cloning parameters' object which user specified
		/// by calling <see cref="SetParameters" />, <see cref="SetOperation" /> or when pair's object is constructed.</summary>
		~GaOperationParametersPair()
		{
			if( _parameters )
				delete _parameters;
		}

		/// <summary>This method is not thread-safe.</summary>
		/// <returns>Returns reference to operation's object.</returns>
		inline OTYPE& GACALL GetOperation() const { return *_operation; }

		/// <summary><c>SetOperation</c> method stores pointer to operation's object. It stores parameters stored by calling
		/// <see cref="SetParameters" /> method.
		///
		/// This method is not thread-safe.</summary>
		/// <param name="operation">pointer to operation's object which will be stored in the pair.</param>
		/// <param name="parameters">reference to parameters' object who's copy will be stored in the pair.</param>
		inline void GACALL SetOperation(OTYPE* operation, PTYPE& parameters)
		{
			_operation = operation;

			SetParameters( parameters );
		}

		/// <summary>This method is not thread-safe.</summary>
		/// <returns>Returns reference to parameter's object.</returns>
		inline PTYPE& GACALL GetParameters() const { return *_parameters; }

		/// <summary><c>SetParameters</c> operation makes copy of (clones) user specified parameter's object and stores pointer to that object.
		/// If pointer to parameters/ object was defined prior the call, this method deletes object to which it was pointing.
		///
		/// This method is not thread-safe.</summary>
		/// <param name="parameters">reference to parameters' object who's copy will be stored in the pair.</param>
		void GACALL SetParameters(PTYPE& parameters)
		{
			if( _parameters )
				delete _parameters;

			_parameters = &parameters ? (PTYPE*)parameters.Clone() : 0;
		}

		/// <summary>This method is not thread-safe.</summary>
		/// <returns>Returns <c>true</c> if pair contains pointer to an operation's object, otherwise it returns <c>false</c>.</returns>
		inline bool GACALL HasOperation() const { return _operation != 0; }

		/// <summary>This method is not thread-safe.</summary>
		/// <returns>Returns <c>true</c> if pair contains pointer to an operation's object, otherwise it returns <c>false</c>.</returns>
		inline bool GACALL HasParameters() const { return _parameters != 0; }

	};// END CLASS DEFINITION GaOperationParametersPair

} // Common

#endif //__GA_OPERATION_H__

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区在线观看不卡| 婷婷综合另类小说色区| 亚洲精品大片www| 久久爱另类一区二区小说| www.色综合.com| 欧美精品一区二区三区四区 | 538在线一区二区精品国产| 欧美国产一区在线| 日韩二区在线观看| 欧美三级韩国三级日本三斤| 久久久国产一区二区三区四区小说| 精品综合久久久久久8888| 色哟哟一区二区在线观看| 国产女人aaa级久久久级 | 欧美日韩小视频| 日韩午夜电影av| 国产视频在线观看一区二区三区| 午夜精品福利久久久| av在线不卡电影| 欧美国产在线观看| 国产乱码字幕精品高清av| 日韩女优av电影在线观看| 亚洲www啪成人一区二区麻豆| 成人性生交大片免费看在线播放| 欧美一级黄色大片| 日本视频一区二区| 91精品国产麻豆| 日韩中文欧美在线| 欧美日韩中文另类| 亚洲成在线观看| 久久人人爽爽爽人久久久| 免费在线观看日韩欧美| 欧美日韩一本到| 亚洲国产一区二区视频| 一本一本久久a久久精品综合麻豆| 日本一区二区电影| 成人av在线一区二区| 国产精品午夜在线观看| 国产99久久久国产精品潘金| 久久综合色8888| 国产成人午夜精品5599| 中文一区二区完整视频在线观看 | 久久成人18免费观看| 欧美xxx久久| 国产一区二区精品久久99| 精品国产污污免费网站入口| 韩国三级电影一区二区| 久久久久亚洲综合| av不卡免费在线观看| 日韩一区日韩二区| 精品视频全国免费看| 亚洲国产精品视频| 日韩女优视频免费观看| 国产精品一级片在线观看| 国产精品久久久久桃色tv| 99久久伊人久久99| 亚洲韩国精品一区| 2020国产精品久久精品美国| 国产精品99久久久久久宅男| 亚洲色图欧洲色图| 欧美三级乱人伦电影| 毛片av一区二区三区| 欧美韩国一区二区| 欧美视频一区二区三区四区 | 东方aⅴ免费观看久久av| 一区二区三区免费在线观看| 91精品国产品国语在线不卡| 国产91精品入口| 亚洲二区在线观看| 国产亚洲成aⅴ人片在线观看| 99久久精品一区二区| 日韩精品一区第一页| 国产丝袜美腿一区二区三区| 欧美日韩综合在线| 成人美女视频在线看| 日韩国产欧美在线视频| 欧美经典三级视频一区二区三区| 欧美视频一区在线| 成人爽a毛片一区二区免费| 亚洲一区二区三区四区不卡 | 精品免费视频一区二区| 91在线精品一区二区三区| 日韩和欧美一区二区三区| 久久女同精品一区二区| 欧美猛男男办公室激情| 国产v日产∨综合v精品视频| 亚洲国产精品欧美一二99| 日韩区在线观看| 色噜噜狠狠一区二区三区果冻| 人人爽香蕉精品| 一区二区高清视频在线观看| 国产视频亚洲色图| 91精品国产免费| 欧美日韩一二三区| 91麻豆国产自产在线观看| 狠狠色狠狠色合久久伊人| 亚洲va欧美va人人爽| 亚洲免费在线观看视频| 国产欧美一区二区精品婷婷| 欧美一区二区三区不卡| 精品视频免费在线| 色综合久久久久久久久久久| 国产99精品国产| 国产精品系列在线观看| 久久国产精品99久久人人澡| 午夜视频一区在线观看| 亚洲一区影音先锋| 亚洲自拍偷拍图区| 亚洲综合999| 一区二区三区中文免费| 国内精品第一页| 美女在线观看视频一区二区| 五月婷婷激情综合| 视频在线观看国产精品| 亚洲成人免费影院| 午夜精品福利在线| 日韩电影免费在线看| 亚洲国产精品欧美一二99| 亚洲综合无码一区二区| 久久久久久久综合狠狠综合| 欧美精品久久久久久久多人混战 | 久久色中文字幕| 91精品国产综合久久久蜜臀图片| 国内精品视频666| 国产一区二区在线看| 久久国内精品视频| 免费在线观看日韩欧美| 日韩电影在线看| 亚洲v精品v日韩v欧美v专区| 日韩成人一区二区三区在线观看| 亚洲午夜精品在线| 亚洲午夜三级在线| 亚洲国产精品一区二区www在线| 国产视频911| 亚洲欧美经典视频| 亚洲欧洲精品天堂一级| 亚洲图片激情小说| 亚洲精品乱码久久久久久黑人 | 99久久精品免费看国产免费软件| 福利电影一区二区三区| 粉嫩蜜臀av国产精品网站| 国产在线不卡一区| 国产suv精品一区二区6| 春色校园综合激情亚洲| 国产一区三区三区| 成人综合婷婷国产精品久久| 91麻豆免费在线观看| 在线免费观看日本一区| 欧美视频一区二区三区在线观看| 欧美日韩一区二区三区视频| 欧美日韩一区二区三区视频| 亚洲主播在线观看| 日韩专区一卡二卡| 久久精品国产一区二区| 国产精品 日产精品 欧美精品| 蜜桃视频一区二区| 99视频精品在线| 欧美视频在线播放| 精品日韩在线观看| 亚洲私人影院在线观看| 视频一区在线视频| 国产一区二区三区在线观看免费视频 | 日本伊人午夜精品| 国产黄色91视频| 91伊人久久大香线蕉| 欧美精品一卡二卡| 日韩欧美激情在线| 一个色综合av| 国内精品免费在线观看| 99久久免费精品高清特色大片| 欧美高清你懂得| 中文字幕一区二区三区不卡| 日韩中文字幕亚洲一区二区va在线| 国产资源精品在线观看| 欧洲激情一区二区| 国产日韩精品一区二区三区在线| 亚洲成人免费视| www.欧美色图| 91麻豆精品国产91久久久使用方法| 久久久蜜桃精品| 亚洲精品国产精华液| 成人18精品视频| 日韩一区二区三| 一区二区三区四区五区视频在线观看| 日韩和欧美一区二区三区| 在线观看一区日韩| 欧美高清在线一区| 麻豆成人av在线| 日本精品一区二区三区高清| 精品理论电影在线观看 | 国产亚洲一区二区三区四区 | 国产欧美在线观看一区| 五月天激情综合网| av午夜一区麻豆| 26uuu欧美| 午夜精品久久久久久久久久| 本田岬高潮一区二区三区| 精品久久人人做人人爰| 亚洲视频精选在线| 99精品久久久久久|