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

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

?? node.cc

?? 用C++編寫的遺傳算法
?? CC
字號:
// node.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------------------------------------------------------------------- */// Function and Terminal Sets// The class NodeSet contains nodes, e.g. functions and terminals.// Some functions choose from either functions and terminals.  A quick// and fast access is desirable.  We do this by placing functions at// the beginning of the container, terminals at the end.#include <stdlib.h>#include <string.h>#include "gp.h"// Copy ConstructorGPNode::GPNode (const GPNode& gpo) : GPObject(gpo) {  nodeValue=gpo.nodeValue;   numOfArgs=gpo.numOfArgs;   representation=copyString (gpo.representation);}// Duplicate a stringchar *GPNode::copyString (char *str){  char *s=new char[strlen (str)+1];  strcpy (s, str);  return s;}// Load operationchar* GPNode::load (istream& is){  char line[400];  is >> nodeValue;  is >> numOfArgs;  // Read in string  do     {      if (!is)	return "Character '\"' not found in stream";      is >> line[0];    }  while (line[0]!='"');  int ix=0;  do     {      if (!is)	return "Matching character '\"' not found in stream";      is >> line[ix++];      if (ix>=(int)sizeof(line)) 	return "Internal buffer overflow: matching character '\"' not found";    }  while (line[ix-1]!='"');  line[ix-1]='\0';  if (representation)    delete [] representation;  representation=copyString (line);  return NULL;}// Save operationvoid GPNode::save (ostream& os){  os << nodeValue << ' ';  os << numOfArgs << ' ';  os << "\"" << representation << "\" ";}// We inherit this function because the user must not put anything in// our container by hand.void GPNodeSet::put (int, GPObject&){  GPExitSystem ("GPNodeSet::put", 		"User must not use this function, but putNode() instead."); }// Put a node in the container.  void GPNodeSet::putNode (GPNode& gpo){#if GPINTERNALCHECK  // Check if full  if (numFunctions+numTerminals==containerSize())    GPExitSystem ("GPNodeSet::putNode", "Node set is full");   // Check if node with same identification number is already in set  // (that's forbidden!)  if (searchForNode (gpo.value()))    GPExitSystem ("GPNodeSet::putNode", 		  "Node with same ID is not allowed in one node set");#endif  // Put functions at the beginning, terminals at the end.  if (gpo.isFunction())    GPContainer::put (numFunctions++, gpo);  else    GPContainer::put (containerSize() - (++numTerminals), gpo);}// Choose a node at random from node set with the given number of// argumentsGPNode* GPNodeSet::chooseNodeWithArgs (int args){  int i, num;  GPNode *n;  // First we count all nodes that have the specified number of  // arguments  for (i=0, num=0; i<containerSize(); i++)    if ((n=NthNode (i)))      if (n->arguments()==args)	num++;  // No node with given number of arguments?  if (num==0)    return NULL;  // Choose one  int k=GPrand() % num;  // Return the node with chosen index  for (i=0, num=0; i<containerSize(); i++)    if ((n=NthNode (i)))      if (n->arguments()==args)	if (num++==k)	  return n;#if GPINTERNALCHECK  GPExitSystem ("GPNodeSet::chooseNodeWithArgs", "Internal error"); #endif  // Avoid compiler warnings (this code is never reached)  return NULL;}// This chooses a function from the set.GPNode& GPNodeSet::chooseFunction (){#if GPINTERNALCHECK  if (numFunctions==0)    GPExitSystem ("GPNodeSet::chooseFunction", 		  "No function to choose from"); #endif  return *NthNode (GPrand() % numFunctions);}// This chooses a terminal from the set.GPNode& GPNodeSet::chooseTerminal (){#if GPINTERNALCHECK  if (numTerminals==0)    GPExitSystem ("GPNodeSet::chooseTerminal", 		  "No terminal to choose from"); #endif  return *NthNode (containerSize()-numTerminals+GPrand() % numTerminals);}// Prints out complete node set.  Functions are printed with// parenthesis and a value to indicate their number of argumentsvoid GPNodeSet::printOn (ostream& os){  // Move through the set printing out each node in turn  for (int i=0; i<containerSize(); i++)    {      GPNode* current=NthNode (i);      if (i>0)	os << ' ';      if (current)	{	  os << *current;	  if (current->isFunction())	    os << "(" << current->arguments() << ")";	}      else	os << "NoNode";    }}// Move through the set looking for the corresponding value.  Return// NULL, if no one found, otherwise the address of the nodeGPNode* GPNodeSet::searchForNode (int value){  // Move through the container  for (int n=0; n<containerSize(); n++)    {      GPNode* current=NthNode (n);      if (current)	if (current->value ()==value)	  return current;    }  // Not found  return NULL;}// Load operationchar* GPNodeSet::load (istream& is){  is >> numFunctions;  is >> numTerminals;  // Load container  return GPContainer::load (is);}// Save operationvoid GPNodeSet::save (ostream& os){  os << numFunctions << ' ';  os << numTerminals << ' ';  // Save container  GPContainer::save (os);}// Prints out complete node set for each adf treevoid GPAdfNodeSet::printOn (ostream& os){  // Move through container printing out each function set in turn  for (int i=0; i<containerSize(); i++)    {      GPNodeSet* current=NthNodeSet (i);      if (current)	os << "GP tree " << i << ": "  << *current << endl;      else	os << "No Set";    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久欧美精品sm网站| 亚洲与欧洲av电影| 一区二区三区高清| 国产一区二区在线观看免费| 91麻豆.com| 日本一区二区三区在线观看| 日本视频中文字幕一区二区三区| 99精品视频在线播放观看| 日韩免费观看2025年上映的电影| 1000部国产精品成人观看| 精品写真视频在线观看| 在线免费观看成人短视频| 国产拍揄自揄精品视频麻豆| 奇米色一区二区| 欧美日韩一区二区三区四区五区 | 国产在线精品国自产拍免费| 在线看国产一区二区| 亚洲欧洲精品天堂一级| 韩国精品在线观看| 欧美不卡一二三| 免费日韩伦理电影| 欧美三级电影一区| 一区二区三区**美女毛片| av激情亚洲男人天堂| 国产精品私人影院| 国产不卡高清在线观看视频| 精品国产一区久久| 日本va欧美va瓶| 日韩一区二区电影| 日韩国产一区二| 日韩免费观看高清完整版在线观看| 亚洲午夜在线观看视频在线| 欧美性感一区二区三区| 国产精品不卡在线观看| 9i看片成人免费高清| 中文字幕在线免费不卡| 成人av先锋影音| 亚洲同性同志一二三专区| www.亚洲在线| 亚洲精品免费看| 在线欧美日韩国产| 五月天欧美精品| 日韩欧美国产wwwww| 麻豆国产精品一区二区三区| 日韩欧美精品在线| 国产一区二区三区精品欧美日韩一区二区三区 | 蜜臀久久99精品久久久久久9 | 色又黄又爽网站www久久| 夜夜嗨av一区二区三区中文字幕| 在线观看视频欧美| 亚洲成av人综合在线观看| 日韩色在线观看| 激情欧美一区二区三区在线观看| 久久综合久久综合久久| 成人动漫av在线| 亚洲一区二区高清| 日韩三级视频中文字幕| 国产精品2024| 一区二区三区毛片| 日韩午夜av电影| 成人午夜免费av| 亚洲一区二区三区四区在线| 欧美一卡二卡在线| 成人免费视频播放| 三级久久三级久久久| 久久美女高清视频| 欧美日韩一区二区三区四区五区 | 亚洲线精品一区二区三区八戒| 欧美精品视频www在线观看| 精品一区中文字幕| 椎名由奈av一区二区三区| 欧美精品九九99久久| 成人黄色在线网站| 免费av网站大全久久| 亚洲视频免费在线观看| 欧美一区二区成人6969| 91热门视频在线观看| 国产一区欧美日韩| 亚洲国产综合在线| 中文一区一区三区高中清不卡| 欧美色男人天堂| 99久久精品免费精品国产| 久久99深爱久久99精品| 亚洲在线成人精品| 亚洲桃色在线一区| 久久精品欧美日韩| 欧美videossexotv100| 色婷婷精品大在线视频 | 91麻豆福利精品推荐| 狠狠色狠狠色综合日日91app| 亚洲国产乱码最新视频| 欧美激情中文字幕一区二区| 欧美大黄免费观看| 欧美精品一二三| 欧美特级限制片免费在线观看| 成人在线视频一区| 国产在线精品一区在线观看麻豆| 性感美女极品91精品| 亚洲人成网站精品片在线观看| 久久女同互慰一区二区三区| 欧美一卡2卡3卡4卡| 欧美三区在线观看| 日本久久精品电影| www.亚洲人| www.在线成人| 97久久精品人人澡人人爽| 国产麻豆一精品一av一免费| 日韩1区2区3区| 日日夜夜精品视频免费| 亚洲午夜电影网| 一二三区精品福利视频| **网站欧美大片在线观看| 国产三级精品三级| 日本一区二区三级电影在线观看| 亚洲精品一区二区在线观看| 日韩免费一区二区| 日韩女优制服丝袜电影| 日韩精品中午字幕| 日韩欧美国产小视频| 日韩欧美国产三级电影视频| 精品国产污网站| www久久精品| 久久精品欧美一区二区三区不卡 | 精品日韩欧美一区二区| 欧美一区日本一区韩国一区| 欧美一区二区久久| 久久综合网色—综合色88| 久久综合色综合88| 日本一区二区成人| 一区二区三区国产| 日本不卡免费在线视频| 奇米四色…亚洲| 国产激情一区二区三区| 成人av在线电影| 欧美色中文字幕| 日韩欧美三级在线| 国产女人18毛片水真多成人如厕| 国产欧美精品一区| 亚洲黄色小说网站| 日本怡春院一区二区| 精品一区二区三区在线视频| 国产福利91精品| 日本道免费精品一区二区三区| 在线精品视频一区二区| 欧美mv日韩mv国产| 亚洲天堂a在线| 日韩专区欧美专区| 国产成人综合在线播放| 日本韩国欧美三级| 2021中文字幕一区亚洲| 亚洲日本欧美天堂| 久久精品国产久精国产| 不卡在线视频中文字幕| 9191精品国产综合久久久久久| 日韩精品一区二区三区蜜臀| 中文字幕在线观看一区| 久久精品av麻豆的观看方式| 高清视频一区二区| 欧美群妇大交群中文字幕| 国产欧美日韩在线看| 亚洲一区二区精品3399| 国产91丝袜在线观看| 欧美电影在哪看比较好| 国产日韩欧美精品综合| 午夜亚洲福利老司机| 国产精品99久久久久久似苏梦涵 | 午夜久久电影网| 国产成人精品免费网站| 在线播放欧美女士性生活| 成人免费小视频| 国内久久精品视频| 欧美日韩一区不卡| 国产精品网站一区| 国产精品亚洲第一| 欧美电影免费观看高清完整版在| 亚洲欧美日韩国产综合| 国产成人一级电影| 精品国产制服丝袜高跟| 日韩高清欧美激情| 欧美网站大全在线观看| ...xxx性欧美| eeuss鲁片一区二区三区在线看| 91精品国产全国免费观看| 一区二区三区在线观看视频| 国产白丝精品91爽爽久久| 26uuu亚洲综合色| 久久精品国产亚洲5555| 91精品国产色综合久久不卡电影| 亚洲激情六月丁香| 日本久久一区二区三区| 日韩美女视频一区二区| 国产福利精品导航| 亚洲精品一区二区三区99| 精品一区二区三区影院在线午夜| 欧美日韩国产在线观看| 一区二区在线观看视频| 99在线精品视频| 亚洲欧美欧美一区二区三区| 99精品桃花视频在线观看| 中文字幕一区在线|