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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? contain.cc

?? 用C++編寫的遺傳算法
?? CC
字號:
// contain.cc/* -------------------------------------------------------------------gpc++ - The Genetic Programming KernelThis program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 1, or (at your option)any later version.This program is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.Copyright 1993, 1994 Adam P. Fraser and 1996, 1997 Thomas WeinbrennerFor comments, improvements, additions (or even money) contact:Thomas WeinbrennerGrauensteinstr. 2635789 LaimbachGermanyE-mail: thomasw@emk.e-technik.th-darmstadt.deWWW:    http://www.emk.e-technik.th-darmstadt/~thomasw  or (Address may be out of date)Adam Fraser, Postgraduate Section, Dept of Elec & Elec Eng,Maxwell Building, University Of Salford, Salford, M5 4WT, United Kingdom.E-mail: a.fraser@eee.salford.ac.ukTel:    (UK) 061 745 5000 x3633Fax:    (UK) 061 745 5999------------------------------------------------------------------- */// Container class.  This class is responsible for the objects placed// in the container.  If a container object is deleted, all objects// contained in the container are also deleted.#include <stdlib.h>#include "gp.h"// ConstructorGPContainer::GPContainer (){  container=NULL;  contSize=0;}// ConstructorGPContainer::GPContainer (int numObjects) {  // Set pointer to NULL, otherwise reserveSpace() complains, and  // allocate space  container=NULL;  reserveSpace (numObjects);}// Copy constructorGPContainer::GPContainer (const GPContainer& gpc) : GPObject(gpc){  // Set pointer to NULL, otherwise reserveSpace() complains, and  // allocate space  container=NULL;  reserveSpace (gpc.contSize);  // Make a copy of all container objects of gpc and save them into  // the array  for (int n=0; n<contSize; n++)    {      if (gpc.container[n])	// This is real magic!  We can duplicate whatever object is in	// the container, be it a whole population!  Thanks to OOP...	put (n, gpc.container[n]->duplicate ());      else		container[n]=NULL;    }}// Destructor.GPContainer::~GPContainer (){  deleteContainer ();}// Deletes all objects that are in the container, and then the array// that points to the objects.void GPContainer::deleteContainer () {  if (container)    {      // Delete container objects      for (int i=0; i<contSize; i++)	if (container[i])	  // As the destructor is virtual, any object in the container	  // is destroyed here	  delete container[i];      // Delete array of pointer to members      delete [] container;      // Set initial conditions      container=NULL;    }}// Reserve space for container, e.g. an array of pointers to the// objects.void GPContainer::reserveSpace (int numObjects) {#if GPINTERNALCHECK  if (container)    GPExitSystem ("GPContainer::reserveSpace", "Container not empty");#endif  // We can't alloc space, if this is 0.  This is not an error!  A  // terminal node, for example, doesn't have children.  if (numObjects<=0)    {       contSize=0;      return;    }  // Save the container size in object  contSize=numObjects;  // Alloc array of pointers and set them to NULL  container=new GPObject*[numObjects];  for (int i=0; i<numObjects; i++)    container[i]=NULL;}// Print the contents of the containervoid GPContainer::printOn (ostream& os){  os << "Container has " << contSize << " Elements:\n";  // Print all members of the container  for (int i=0; i<containerSize(); i++)    if (container[i]==NULL)      os << "(NULL) ";    else      os << *container[i];}// Gets the n-th object from the container.  This function might// return NULL, if there is no object at that location.GPObject* GPContainer::Nth (int n) const{#if GPINTERNALCHECK  if (!container)    GPExitSystem ("GPContainer::Nth", "No container");  if (n>=contSize || n<0)    GPExitSystem ("GPContainer::Nth", "Wrong range for index n");#endif  return container[n];}// Return the adress of the pointer to the n-th Object within the// container.  This is usefule for crossover, as only pointers are// swapped to exchange complete subtreesGPObject** GPContainer::getPointerAddress (int n) const{#if GPINTERNALCHECK  if (!container)    GPExitSystem ("GPContainer::getPointerAdress", "No container");  if (n>=contSize || n<0)    GPExitSystem ("GPContainer::getPointerAdress", 		  "Wrong range for index n");#endif  return &container[n];}// Place an object in the container.  Now it's owned by the container!// If the container is destroyed, its objects are destroyed alsovoid GPContainer::put (int n, GPObject& gpo){#if GPINTERNALCHECK  if (!container)    GPExitSystem ("GPContainer::put", "No container");  if (n>=contSize || n<0)    GPExitSystem ("GPContainer::put", "Wrong range for index n");#endif  // If there is already an element, delete it.  The virtual  // destructor is used to kill the object.  if (container[n]!=NULL)    delete container[n];  // Put the object at the given location  container[n]=&gpo;}// Get an object from the container.  Now the container is no longer// responsible for its destruction, as it doesn't own it any longer.// The receiver expects an object and therefore it is checked that// there is indeed an object in the container at that position.GPObject& GPContainer::get (int n){#if GPINTERNALCHECK  if (!container)    GPExitSystem ("GPContainer::get", "No container");  if (n>=contSize || n<0)    GPExitSystem ("GPContainer::get", "Wrong range for index n");  if (container[n]==NULL)    GPExitSystem ("GPContainer::get", "No object at position");#endif  GPObject* tmp=container[n];  // Set the reference to NULL, so that we know there is no longer any  // object  container[n]=NULL;  return *tmp;}// Loading a container is more difficult than saving...char* GPContainer::load (istream& is){  int id=0;  // First check the ID  is >> id;  if (id!=isA ())    return "Object ID GPContainerID expected, but not found";    // Read container size from stream and reserve space  is >> contSize;  reserveSpace (contSize);  // Load all members of the container  for (int i=0; i<contSize; i++)    {      // Test if element was a NULL pointer or an object      char elementIsThere='n';      is >> elementIsThere;      if (elementIsThere=='y')	{	  // Read identification number of object	  int ID;	  is >> ID;	  // Create that element depending on the ID that was saved	  // before.  A special registration mechanism is used to be	  // able to create any object that was saved before and was	  // registered also.	  container[i]=GPCreateRegisteredClassObject (ID);	  // Let the created object load itself.  Abort, of an error	  // occured	  char* errMsg=container[i]->load (is);	  if (errMsg) 	    return errMsg;	}    }  // No error  return NULL;}// Saving a container is pretty easy.void GPContainer::save (ostream& os){  // Save the ID  os << "\n" << isA() << ' ';  // Size  os << contSize << ' ';  // Save all members of the container  for (int i=0; i<containerSize(); i++)    if (container[i]==NULL)      // No element      os << 'n';    else      {	// Element is there	os << 'y';	// Save identification number and element itself	os << container[i]->isA () << ' ';	container[i]->save (os);      }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色狠狠综合天天综合综合| 色综合夜色一区| 蜜臀91精品一区二区三区| 一区二区三区四区激情| 亚洲视频免费观看| 一区二区三区四区高清精品免费观看| 欧美国产日韩一二三区| 亚洲国产精品高清| 亚洲精品中文字幕在线观看| 亚洲三级久久久| 亚洲国产视频一区| 日本亚洲欧美天堂免费| 久久国产日韩欧美精品| 国产精品一区免费在线观看| 国产成人精品影院| 色婷婷av一区二区三区gif| 色94色欧美sute亚洲线路二 | 亚洲乱码日产精品bd| 国产精品久久久久天堂| 亚洲美女精品一区| 日韩电影免费在线| 国产一区二区三区四区五区美女| 福利电影一区二区| 91成人看片片| 日韩免费在线观看| 亚洲欧洲另类国产综合| 亚洲国产精品天堂| 国产一区二区成人久久免费影院 | 国内精品伊人久久久久影院对白| 国产一区二区三区最好精华液| 国产精品88av| 在线中文字幕一区| 精品国产在天天线2019| 亚洲欧美另类图片小说| 麻豆精品精品国产自在97香蕉| 国产电影一区在线| 欧美日韩午夜在线视频| 国产欧美日韩不卡| 日日夜夜精品视频天天综合网| 国产91对白在线观看九色| 在线国产亚洲欧美| 国产欧美一区二区精品秋霞影院 | 国产精品三级av| 日韩二区三区在线观看| 99re热这里只有精品视频| 制服丝袜中文字幕一区| 亚洲人成影院在线观看| 国产一区999| 日韩免费高清电影| 午夜久久久久久| 色综合久久88色综合天天免费| 久久综合999| 丝袜美腿亚洲一区二区图片| 色婷婷综合久久久中文一区二区| 久久久午夜精品| 麻豆国产欧美日韩综合精品二区| 色94色欧美sute亚洲线路二 | 91视频精品在这里| 国产日韩av一区| 蜜桃视频第一区免费观看| 欧美色综合影院| 亚洲视频1区2区| www.欧美亚洲| 欧美激情在线观看视频免费| 国产美女精品一区二区三区| 91精品国产欧美一区二区成人| 亚洲一区在线观看网站| 在线免费av一区| 亚洲一区二三区| 欧美在线|欧美| 亚洲一区二区三区四区中文字幕| 97se亚洲国产综合自在线观| 国产精品蜜臀av| 成人app在线| 亚洲天堂2014| 日本韩国精品一区二区在线观看| 中文字幕亚洲一区二区va在线| 丁香六月综合激情| 国产精品久久午夜| 9l国产精品久久久久麻豆| 国产精品毛片高清在线完整版 | 欧美绝品在线观看成人午夜影视| 亚洲精品日韩一| 欧洲日韩一区二区三区| 天天爽夜夜爽夜夜爽精品视频| 欧美福利电影网| 国产一区二区福利| 成人欧美一区二区三区在线播放| 91在线云播放| 日本亚洲电影天堂| 精品99999| 91在线视频播放| 日韩精品色哟哟| 欧美va亚洲va| 99久久夜色精品国产网站| 亚洲综合清纯丝袜自拍| 欧美另类高清zo欧美| 久久99国内精品| 亚洲日本韩国一区| 日韩午夜激情免费电影| 东方欧美亚洲色图在线| 一区二区日韩av| 精品免费国产一区二区三区四区| 成人久久视频在线观看| 一区二区三区免费观看| 精品国偷自产国产一区| 国产91露脸合集magnet| 午夜婷婷国产麻豆精品| 欧美国产精品久久| 56国语精品自产拍在线观看| 懂色av一区二区夜夜嗨| 婷婷丁香激情综合| 国产精品理论片| 欧美mv和日韩mv的网站| 色哟哟一区二区三区| 国产一区二区三区av电影| 亚洲自拍偷拍九九九| 国产欧美日本一区二区三区| 欧美三区在线视频| av电影在线观看完整版一区二区 | 久久婷婷久久一区二区三区| 色久优优欧美色久优优| 国产精品一级片在线观看| 一区2区3区在线看| 国产精品五月天| 久久影视一区二区| 欧美性色黄大片| 91看片淫黄大片一级在线观看| 国内精品久久久久影院色| 亚洲午夜精品网| 亚洲精品国产精华液| 国产精品欧美精品| 精品国产乱码久久久久久免费 | 国产精品系列在线| 精品欧美乱码久久久久久| 欧美日韩性生活| 欧洲亚洲国产日韩| 91网站在线观看视频| 国产aⅴ精品一区二区三区色成熟| 日韩av中文字幕一区二区| 一区二区三区精品在线观看| 国产精品国产三级国产a | 精品视频资源站| 日本福利一区二区| av电影在线不卡| 色综合网色综合| 91一区一区三区| 91福利在线观看| 欧美性感一区二区三区| 在线精品观看国产| 欧美日韩电影在线| 91精品婷婷国产综合久久竹菊| 欧美理论电影在线| 欧美人狂配大交3d怪物一区| 欧美巨大另类极品videosbest| 欧美三级日韩在线| 欧美一区在线视频| 精品国产网站在线观看| 2020国产精品久久精品美国| 欧美一区二区三区小说| 日韩精品一区二区三区蜜臀| 欧美电视剧在线看免费| 久久美女艺术照精彩视频福利播放| 2024国产精品| 国产精品美女www爽爽爽| 亚洲免费色视频| 亚洲成人黄色小说| 极品美女销魂一区二区三区| 国产精品456| 色婷婷综合中文久久一本| 欧美日韩国产a| 精品久久久久99| 中文字幕综合网| 日韩电影一区二区三区| 久久电影网电视剧免费观看| 成人自拍视频在线观看| 色婷婷久久综合| 精品理论电影在线| 亚洲美女视频在线| 久久精品国产一区二区三 | 精品av久久707| 中文字幕在线一区| 视频一区二区不卡| 成人妖精视频yjsp地址| 欧美人妖巨大在线| 国产精品丝袜久久久久久app| 一区二区三区欧美亚洲| 麻豆精品新av中文字幕| 92精品国产成人观看免费| 日韩久久免费av| 一区二区三区免费观看| 国产一区二区视频在线| 欧美亚洲动漫另类| 国产精品乱码久久久久久| 日韩激情在线观看| 色素色在线综合| 中文字幕免费不卡| 奇米色一区二区三区四区| 91影院在线免费观看| 精品国产乱码久久久久久浪潮|