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

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

?? config.cc

?? 用C++編寫的遺傳算法
?? CC
字號(hào):
// config.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------------------------------------------------------------------- *//*This code is provided just for your convenience. It provides an easy and simple to use way to define constants in a.ini-file, which are read in by the constructor of this class.Simply call the constructor with the stream to put any messages on(only for error messages, in case the file is malformed), theinitialisation file name, and an array of structures describing eachvariable.  The array must end with a NULL pointer in the structurevariable varPtr.  The constructor reads the file and puts all thevalues of the variables he finds in the denoted memory location.Strings are duplicated; space is allocated with new char[] and shouldbe freed, if no longer used.  In the case of a configuration variableof type string, the structure variable varPtr points to a (char *),that's better than providing space for yourself, because you needn'tworry you reserved enough space for your variable.  The structure mustbe global, because a pointer to the structure is saved to be used forother routines as well.Example:  char *measuredOutputDataFile="pt2.dat";  double startTemperature=1.0;  int numberOfIterations=10;  // Define configuration parameters  struct GPConfigVarInformation configArray[]=  {    {"numberOfIterations", DATAINT, &numberOfIterations},    {"startTemperature", DATADOUBLE, &startTemperature},    {"measuredOutputDataFile", DATASTRING, &measuredOutputDataFile},    {"", 0, NULL}  };  // Read in configuration file  configuration config (cout, "main.ini", configArray);Thomas Weinbrenner 1996, 1997*/#include <fstream.h>#include <iomanip.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include "gpconfig.h"GPConfiguration::GPConfiguration (ostream &out, char *fname,				  struct GPConfigVarInformation cfg[])  // Constructor: Read in configuration file.{  char line[1000];  int lineNum=0;  char *s;  // We save a pointer to the describing structure, if we need it  // later in other routines. This is quick&dirty, but well in this  // case I say use your own code if you think so  saveStruc=cfg;  // Open file  ifstream f (fname);  if (!f)    {      out << "Can't read configuration file " << fname 	  << ", writing default values to same file" << endl;      ofstream fo (fname);      fo << *this;      return;    }  // Process lines of the file  while (!f==0)    {      // Get line from the file       f.getline (line, sizeof(line)-1);      line[sizeof(line)-1]='\0';      lineNum++;      // Kill whitespaces at end of line      char *last=line+strlen (line)-1;      while (last>=line && isspace (*last))	{	  *last='\0';	  last--;	}      // Check for comment line or empty line      if (line[0]=='#' || strlen (line)==0)	continue;      // Search for '='      char *search=strchr (line, '=');      if (!search)	{	  out << "Missing = in line " << lineNum << endl;	  continue;	}      *search='\0';            // Kill whitespaces and check for correct value      last=search-1;      search++;      while (isspace (*search))	search++;      while (last>=line && isspace (*last))	{	  *last='\0';	  last--;	}      if (strlen (line)==0)	{	  out << "No variable name given in line " << lineNum << endl;	  continue;	}      if (strlen (search)==0)	{	  out << "No value given in line " << lineNum << endl;	  continue;	}            // Search for variable name in configuration array. Don't report      // an error, if not found there.  This is probably done by      // purpose.      int found=0;      for (int i=0; cfg[i].varPtr!=NULL; i++)	{	  if (strcmp (line, cfg[i].name)==0)	    {	      found=1;	      switch (cfg[i].typ)		{		case DATAFLOAT:		  *(float *)cfg[i].varPtr=(float) atof (search);		  break;		case DATADOUBLE:		  *(double *)cfg[i].varPtr=(double) atof (search);		  break;		case DATAINT:		  *(int *)cfg[i].varPtr=(int) atoi (search);		  break;		case DATASTRING:		  s=new char [strlen(search)+1];		  strcpy (s, search);		  * ((char **)cfg[i].varPtr)=s;		  break;		default:		  out << "Unknown data type in internal structure" 		      << endl;		}	      break;	    }	}    }}GPConfiguration::~GPConfiguration ()  // Destructor{}void GPConfiguration::printOn (ostream& o) const  // Print all configuration variables to o{  o << "# Configuration (default values), created by class configuration)\n";  for (int i=0; saveStruc[i].varPtr!=NULL; i++)    {      o << saveStruc[i].name;      for (int j=strlen (saveStruc[i].name); j<31; j++)	o << ' ';      o << " = ";      switch (saveStruc[i].typ)	{	case DATAFLOAT:	  o << *(float *)saveStruc[i].varPtr;	  break;	case DATADOUBLE:	  o << *(double *)saveStruc[i].varPtr;	  break;	case DATAINT:	  o << *(int *)saveStruc[i].varPtr;	  break;	case DATASTRING:	  o << *(char **)saveStruc[i].varPtr;	  break;	default:	  o << "Unknown data type in internal structure\n";	}      o << endl;    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美羞羞免费网站| 成人精品国产福利| 在线日韩国产精品| 国产精品久久久久影院老司 | 免费成人小视频| 在线亚洲高清视频| 一区二区中文字幕在线| 成人一区二区三区中文字幕| 久久婷婷综合激情| 国产乱子伦一区二区三区国色天香| 欧洲av在线精品| 亚洲v精品v日韩v欧美v专区| 欧美最新大片在线看| 亚洲国产日韩在线一区模特| 欧美在线999| 天堂成人免费av电影一区| 欧美日韩亚洲高清一区二区| 日韩精品成人一区二区三区 | 最新久久zyz资源站| 成人一区二区三区视频| 一色桃子久久精品亚洲| 91九色02白丝porn| 天天色综合成人网| 日韩欧美中文一区| 国产一区中文字幕| 国产精品女人毛片| 欧美日韩色一区| 欧美aaaaaa午夜精品| 日本一区二区免费在线观看视频| aaa国产一区| 午夜视频一区二区| 欧美一级艳片视频免费观看| 国产激情精品久久久第一区二区| 国产精品久久久久四虎| 欧美日韩免费观看一区三区| 精品系列免费在线观看| 中文字幕欧美国产| 欧美视频在线一区二区三区| 久久国产人妖系列| 一区二区三区在线免费播放| 日韩一区二区高清| 色八戒一区二区三区| 久久国产三级精品| 亚洲成人av电影在线| 中文一区二区完整视频在线观看| 欧美在线视频不卡| 国产不卡在线播放| 婷婷成人激情在线网| 国产精品久久久久久久蜜臀| 日韩三级免费观看| 日本乱人伦一区| 成人精品小蝌蚪| 蜜臀av性久久久久蜜臀av麻豆| 中文字幕五月欧美| 久久久亚洲欧洲日产国码αv| 欧美巨大另类极品videosbest | 亚洲风情在线资源站| 中文字幕一区二区三| 久久久激情视频| 精品欧美一区二区在线观看| 在线精品视频小说1| av在线这里只有精品| 成人午夜在线视频| 成人午夜视频网站| 国产福利一区在线观看| 麻豆久久久久久久| 狂野欧美性猛交blacked| 欧美aa在线视频| 韩国成人精品a∨在线观看| 久久疯狂做爰流白浆xx| 麻豆91精品视频| 国产一区在线精品| 国产福利91精品一区| 色婷婷综合久久| 欧美一区二区三区在| 欧美精品在线观看播放| 国产一区二区中文字幕| 制服丝袜在线91| 蜜臀久久99精品久久久久宅男 | 91精品国产欧美一区二区18 | 国产人妖乱国产精品人妖| 欧美成人a∨高清免费观看| 欧美成人a视频| 国产性天天综合网| 中文字幕日韩av资源站| 亚洲精品菠萝久久久久久久| 亚洲成人你懂的| 国产一区二区在线电影| 91蜜桃在线免费视频| 91精品国产综合久久福利软件| 欧美日韩亚洲综合在线 | 久久伊人蜜桃av一区二区| 久久精品视频一区二区三区| 亚洲四区在线观看| 日产国产欧美视频一区精品| 国产精一区二区三区| 色视频成人在线观看免| 日韩欧美一区二区在线视频| 国产欧美综合在线| 日日噜噜夜夜狠狠视频欧美人 | 一区二区三区欧美亚洲| 欧美妇女性影城| 精品国产91久久久久久久妲己 | 欧美日韩国产高清一区| 久久你懂得1024| 午夜精品福利一区二区三区av| 国产激情一区二区三区桃花岛亚洲| 欧洲一区二区av| 欧美激情一区二区三区在线| 日韩电影在线免费观看| 91在线视频播放| 久久天天做天天爱综合色| 亚洲第一成人在线| www.欧美色图| 国产人妖乱国产精品人妖| 久久国产成人午夜av影院| 欧美视频一区二| 亚洲三级电影网站| 成人激情电影免费在线观看| 精品精品国产高清一毛片一天堂| 亚洲h动漫在线| 欧美色大人视频| 亚洲一区精品在线| 精品视频一区 二区 三区| 自拍偷拍亚洲综合| www.爱久久.com| 亚洲日本丝袜连裤袜办公室| 97久久超碰国产精品电影| 国产精品丝袜在线| 91在线视频观看| 伊人性伊人情综合网| 欧美亚洲图片小说| 中文字幕欧美日韩一区| 国产精品白丝av| 中文字幕日本不卡| 91麻豆蜜桃一区二区三区| 一区二区三区在线不卡| 欧美日韩一区二区欧美激情| 日本视频在线一区| 久久―日本道色综合久久| 国产成人精品aa毛片| 亚洲三级视频在线观看| 欧美日韩高清一区| 久久精品72免费观看| 中文字幕精品综合| 日本高清不卡aⅴ免费网站| 日本欧美一区二区| 中文字幕精品一区二区精品绿巨人| 北条麻妃国产九九精品视频| 亚洲男女毛片无遮挡| 日韩一区二区三区免费看 | 日韩一区二区免费在线电影 | 日韩免费看网站| 99久久精品免费精品国产| 午夜日韩在线观看| 中文字幕不卡在线播放| 欧美性色黄大片| 国产一区不卡精品| 亚洲福利视频一区| 欧美国产禁国产网站cc| 91精品国产色综合久久久蜜香臀| 国产.欧美.日韩| 麻豆精品国产传媒mv男同| 亚洲日本乱码在线观看| 久久伊99综合婷婷久久伊| 欧美日韩免费高清一区色橹橹| 国产一区二区精品久久99| 三级亚洲高清视频| 亚洲免费观看高清在线观看| 精品av综合导航| 91精品黄色片免费大全| 欧美色窝79yyyycom| 97成人超碰视| 不卡一区二区三区四区| 极品销魂美女一区二区三区| 亚洲成人动漫av| 亚洲欧洲精品一区二区三区不卡| 久久综合九色综合97婷婷女人 | 无码av中文一区二区三区桃花岛| 国产精品不卡在线| 欧美国产视频在线| 久久人人97超碰com| 日韩欧美第一区| 欧美大片拔萝卜| 精品免费视频.| 日韩精品一区二区在线观看| 日韩无一区二区| 日韩欧美国产综合一区 | 7878成人国产在线观看| 欧美日韩国产综合视频在线观看 | 一区二区三区在线观看动漫| 一区二区三区在线高清| 亚洲第一成年网| 美女一区二区三区| 国产精品一区在线观看你懂的| 国产美女久久久久| 99麻豆久久久国产精品免费| 91国产免费看| 91麻豆精品国产自产在线观看一区 | 国产精品一品二品|