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

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

?? setup.c

?? 遺傳算法工具
?? C
字號:
/*
SGPC: Simple Genetic Programming in C
(c) 1993 by Walter Alden Tackett and Aviram Carmi
 
 This code and documentation is copyrighted and is not in the public domain.
 All rights reserved. 
 
 - This notice may not be removed or altered.
 
 - You may not try to make money by distributing the package or by using the
   process that the code creates.
 
 - You may not distribute modified versions without clearly documenting your
   changes and notifying the principal author.
 
 - The origin of this software must not be misrepresented, either by
   explicit claim or by omission.  Since few users ever read sources,
   credits must appear in the documentation.
 
 - Altered versions must be plainly marked as such, and must not be
   misrepresented as being the original software.  Since few users ever read
   sources, credits must appear in the documentation.
 
 - The authors are not responsible for the consequences of use of this 
   software, no matter how awful, even if they arise from flaws in it.
 
If you make changes to the code, or have suggestions for changes,
let us know!  (gpc@ipld01.hac.com)
*/

#ifndef lint
static char setup_c_rcsid[]="$Id: setup.c,v 1.3 1993/07/07 05:30:39 gpc-avc Exp gpc-avc $";
#endif

/*
 *
 * $Log: setup.c,v $
 * Revision 1.3  1993/07/07  05:30:39  gpc-avc
 * added #ifdef SQRT and psqrt()
 *
 * Revision 1.2  1993/05/14  21:34:57  gpc-avc
 * Changed pdiv to return 1 on div by zero (per Koza)
 *
 * Revision 1.1  1993/05/14  03:10:49  gpc-avc
 * Initial revision
 *
 * Revision 2.6  1993/04/30  05:08:38  gpc-avc
 * Restructured directories and Makefile
 *
 * Revision 2.4  1993/04/15  09:16:52  gpc-avc
 * Added proto.h plus minor chages to bring inline with rest of code
 *
 *
 */

#include <stdio.h>
#include "gpc.h"
#include "prob.h"
#include "math.h"

#ifdef ANSI_FUNC

VOID make_function_table(
     int	numpops,
     pop_struct *pop
     )
#else

VOID make_function_table(numpops, pop)
  int		numpops;
  pop_struct	*pop;
#endif
{
  int p;

  for (p=0; p<numpops; p++) {
    pop[p].function_table_size = 5;
    pop[p].function_table =
      (function_table_entry *) malloc(pop[p].function_table_size *
				      sizeof(function_table_entry));
    
    pop[p].function_table[0].arity = 2;
    pop[p].function_table[0].macro = FALSE;
    pop[p].function_table[0].enabled = TRUE;
    pop[p].function_table[0].printname = "+";
    pop[p].function_table[0].code = plus;
    
    pop[p].function_table[1].arity = 2;
    pop[p].function_table[1].macro = FALSE;
    pop[p].function_table[1].enabled = TRUE;
    pop[p].function_table[1].printname = "-";
    pop[p].function_table[1].code = minus;
    
    pop[p].function_table[2].arity = 2;
    pop[p].function_table[2].macro = FALSE;
    pop[p].function_table[2].enabled = TRUE;
    pop[p].function_table[2].printname = "*";
    pop[p].function_table[2].code = xtimes;
    
    pop[p].function_table[3].arity = 2;
    pop[p].function_table[3].macro = FALSE;
    pop[p].function_table[3].enabled = TRUE;
    pop[p].function_table[3].printname = "%";
    pop[p].function_table[3].code = pdiv;
#ifdef SQRT
    pop[p].function_table[4].arity = 1;
    pop[p].function_table[4].macro = FALSE;
    pop[p].function_table[4].enabled = TRUE;
    pop[p].function_table[4].printname = "SQRT";
    pop[p].function_table[4].code = psqrt;
#else
    pop[p].function_table[4].arity = 4;
    pop[p].function_table[4].macro = TRUE;
    pop[p].function_table[4].enabled = TRUE;
    pop[p].function_table[4].printname = "IFLTE";
    pop[p].function_table[4].code = iflte;
#endif
  }
}

#ifdef ANSI_FUNC

VOID make_terminal_table(
  int		numpops,
  pop_struct 	*pop
  )
#else

VOID make_terminal_table(numpops,pop)
  int		numpops;
  pop_struct 	*pop;
#endif
{
  /* IMPORTANT NOTE: terminal_table_size should be equal to the number of
     terminals, but there should be (terminal_table_size+1) entries to allow
     for reading/printing actual constants 
   */

  int p;

  /*
    NOTE: all populations are the same for this case
  */

  for (p=0; p<numpops; p++) {

/*    pop[p].terminal_table_size = 7;
*/
    pop[p].terminal_table_size = 3;

    pop[p].terminal_table =
      (terminal_table_entry *) malloc((pop[p].terminal_table_size+1) *
				      sizeof(terminal_table_entry));
    pop[p].terminal_table[0].val = 0;
    pop[p].terminal_table[0].printname = "X";
    pop[p].terminal_table[0].constant_generator = random_constant;
    
    pop[p].terminal_table[1].val = 0;
    pop[p].terminal_table[1].printname = "Y";
    pop[p].terminal_table[1].constant_generator = random_constant;

    pop[p].terminal_table[2].val = 0;
    pop[p].terminal_table[2].printname = "Z";
    pop[p].terminal_table[2].constant_generator = random_constant;
/*    
    pop[p].terminal_table[3].val = 0;
    pop[p].terminal_table[3].printname = "F03";
    pop[p].terminal_table[3].constant_generator = random_constant;
    
    pop[p].terminal_table[4].val = 0;
    pop[p].terminal_table[4].printname = "F04";
    pop[p].terminal_table[4].constant_generator = random_constant;
    
    pop[p].terminal_table[5].val = 0;
    pop[p].terminal_table[5].printname = "F05";
    pop[p].terminal_table[5].constant_generator = random_constant;
    
    pop[p].terminal_table[6].val = 0;
    pop[p].terminal_table[6].printname = "F06";
    pop[p].terminal_table[6].constant_generator = random_constant;
*/    
    pop[p].terminal_table[pop[p].terminal_table_size].val = 0;
    pop[p].terminal_table[pop[p].terminal_table_size].printname = FORMAT;
    pop[p].terminal_table[pop[p].terminal_table_size].constant_generator =
      random_constant;

    pop[p].format = FORMAT;
    pop[p].ckpt_format = CKPT_FORMAT;

  }
}
   
#ifdef ANSI_FUNC

GENERIC plus(
	GENERIC *args
	)
#else

GENERIC plus(args)
  GENERIC *args;
#endif
{
  return args[0]+args[1];
}

#ifdef ANSI_FUNC

GENERIC minus(
	GENERIC *args
	)
#else

GENERIC minus(args)
  GENERIC *args;
#endif
{
  return args[0]-args[1];
}

#ifdef ANSI_FUNC

GENERIC xtimes(
	GENERIC *args
	)
#else

GENERIC xtimes(args)
  GENERIC *args;
#endif
{
  return args[0]*args[1];
}

#ifdef ANSI_FUNC

GENERIC pdiv(
	GENERIC *args
	)
#else

GENERIC pdiv(args)
  GENERIC *args;
#endif
{
  return (args[1] ? args[0]/args[1] : 1);
}

#ifdef ANSI_FUNC

GENERIC psqrt(
	GENERIC *args
	)
#else

GENERIC psqrt(args)
  GENERIC *args;
#endif
{
  return (args[0] >= 0.0? (float) sqrt((double)(args[0])) :
	  		  (float) sqrt((double)-(args[0])));
}

/* this is an example of a macro: arguments are evaluated conditionally */
/* note that args are unevaluated trees, not GENERIC values */

#ifdef ANSI_FUNC

GENERIC iflte(
	tree **args
  )
#else

GENERIC iflte(args)
/* not that args are unevaluated trees, not GENERIC values */
  tree 	**args;
#endif
{
  return ((eval(args[0]) < eval(args[1])) ? eval(args[2]) : eval(args[3]));
}

#ifdef ANSI_FUNC

GENERIC random_constant(void)
#else

GENERIC random_constant()
#endif
{
  return ((GENERIC)random_float(10.0) - (GENERIC)5.0);
}






ENERIC values */
  tree 	**args;
#endif
{
  return ((eval(args[0]) < eval(args[1])) ? eval(args[2]) : eval(args[3]));
}

#ifdef ANSI_FUNC

GENERIC random_constant(void)
#else

GENERIC random_constant()
#endif
{
  return ((GENERIC)random_float(10.0) - (GENERIC)5.0);
}






?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人午夜av在线| 一本一道久久a久久精品 | 久久99国产精品久久99| 精品一区二区三区在线播放| 国产91精品一区二区| 欧亚洲嫩模精品一区三区| 日韩美女一区二区三区| 中文字幕欧美一区| 免费看欧美女人艹b| 成人伦理片在线| 欧美一区二区大片| 亚洲欧美区自拍先锋| 美女网站一区二区| 成a人片国产精品| 欧美色老头old∨ideo| 国产三级精品三级在线专区| 亚洲永久精品大片| 高清成人免费视频| 日韩精品一区二区三区视频播放| 中文字幕亚洲综合久久菠萝蜜| 天天亚洲美女在线视频| av男人天堂一区| 91精品国产欧美日韩| 亚洲日本电影在线| 国产一区二区在线视频| 欧美一区二区三级| 亚洲最新在线观看| 成人一级片在线观看| 欧美电影在线免费观看| 亚洲图片欧美激情| 豆国产96在线|亚洲| 精品美女在线播放| 日韩国产欧美三级| 色婷婷精品久久二区二区蜜臀av | 色婷婷精品大视频在线蜜桃视频| 精品国产网站在线观看| 亚洲成人手机在线| 在线免费视频一区二区| 国产农村妇女毛片精品久久麻豆| 秋霞成人午夜伦在线观看| 在线观看一区不卡| 亚洲欧美日本韩国| 91亚洲精品久久久蜜桃| 国产精品成人午夜| av午夜精品一区二区三区| 国产精品素人一区二区| 国产经典欧美精品| 久久久国际精品| 国产成人免费在线观看不卡| 久久久国产精华| 粉嫩嫩av羞羞动漫久久久 | 国产精品成人免费在线| 国产精品18久久久久久久网站| 日韩一本二本av| 久久99久久99小草精品免视看| 宅男噜噜噜66一区二区66| 日一区二区三区| 欧美性猛片xxxx免费看久爱| 亚洲综合一区在线| 欧美日韩在线播放一区| 亚洲一二三区不卡| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲三级免费观看| 色综合亚洲欧洲| 亚洲www啪成人一区二区麻豆| 丰满少妇久久久久久久| 亚洲丝袜另类动漫二区| 欧美性色aⅴ视频一区日韩精品| 午夜久久久久久| 91精品欧美久久久久久动漫| 麻豆国产欧美日韩综合精品二区| 26uuu欧美日本| 精品中文字幕一区二区| 中文字幕欧美日本乱码一线二线| 国产一区二区三区电影在线观看| 久久蜜臀精品av| 91女厕偷拍女厕偷拍高清| 午夜国产不卡在线观看视频| 欧美va日韩va| 国产成人午夜高潮毛片| 亚洲精品高清在线观看| 欧美电影精品一区二区| 成人av中文字幕| 午夜精品久久久久久| 久久久久久免费网| 色妹子一区二区| 麻豆精品在线看| 亚洲欧洲精品天堂一级| 欧美一区二区三区思思人| 国产精品伊人色| 性做久久久久久久免费看| 国产视频一区二区在线观看| 91精品国产色综合久久ai换脸| 色婷婷国产精品| 成人中文字幕电影| 国产麻豆视频一区二区| 日本成人在线电影网| 一区二区三区在线免费视频| 国产精品久久久久婷婷二区次 | 欧美日韩亚洲不卡| 99精品欧美一区| 成人免费高清在线观看| 激情深爱一区二区| 经典三级在线一区| 激情综合色播激情啊| 久久激情五月婷婷| 美女视频黄久久| 麻豆国产欧美一区二区三区| 免费成人美女在线观看.| 日韩在线观看一区二区| 午夜精品福利一区二区三区av| 一区二区在线观看视频在线观看| 亚洲柠檬福利资源导航| 亚洲欧美日韩国产综合| 亚洲欧美日韩久久| 亚洲毛片av在线| 亚洲综合一区二区精品导航| 一区二区高清免费观看影视大全| 亚洲综合色成人| 亚洲无线码一区二区三区| 图片区小说区国产精品视频| 亚洲小少妇裸体bbw| 亚洲成人免费视频| 免费亚洲电影在线| 国产一区二区日韩精品| 国产91丝袜在线播放| 成人国产在线观看| 色偷偷成人一区二区三区91 | 久久久久国产精品麻豆| 中文字幕欧美激情一区| 亚洲免费伊人电影| 亚洲超丰满肉感bbw| 日产欧产美韩系列久久99| 美国十次综合导航| 国模娜娜一区二区三区| 波多野结衣精品在线| 在线免费观看视频一区| 日韩一区二区三区视频| 久久精品欧美日韩| 亚洲精品国产精品乱码不99 | 日本大胆欧美人术艺术动态| 狠狠久久亚洲欧美| av一二三不卡影片| 欧美久久一二区| 国产亚洲视频系列| 一区二区久久久| 国内精品伊人久久久久av一坑 | 欧美大片在线观看一区| 国产精品视频第一区| 亚洲国产欧美日韩另类综合| 麻豆一区二区三| 一本久道久久综合中文字幕| 日韩一区国产二区欧美三区| 中文字幕av在线一区二区三区| 亚洲电影在线播放| 国产精品1区二区.| 欧美一级免费大片| 亚洲人成影院在线观看| 极品美女销魂一区二区三区免费| 色综合久久久久综合体桃花网| 日韩欧美一级在线播放| 一区二区三区蜜桃| 国产二区国产一区在线观看| 8v天堂国产在线一区二区| 中文字幕av资源一区| 精品一区二区三区日韩| 欧美色图片你懂的| 亚洲国产高清aⅴ视频| 麻豆91在线看| 欧美中文字幕亚洲一区二区va在线 | 亚洲免费观看高清完整版在线| 激情五月婷婷综合| 欧美日韩国产一区| 亚洲乱码一区二区三区在线观看| 国产尤物一区二区在线| 91精品视频网| 亚洲电影中文字幕在线观看| 91麻豆国产香蕉久久精品| 国产亚洲视频系列| 韩日欧美一区二区三区| 日韩一区和二区| 婷婷国产v国产偷v亚洲高清| 91丨九色丨黑人外教| 中文字幕不卡一区| 国产精品一区一区| 2022国产精品视频| 六月丁香综合在线视频| 日韩一级免费一区| 丝袜脚交一区二区| 欧美精品在线观看播放| 夜夜亚洲天天久久| 欧美亚洲综合一区| 亚洲自拍偷拍欧美| 在线视频欧美区| 亚洲国产综合91精品麻豆| 欧美午夜电影在线播放| 亚洲精品成人少妇| 欧美综合天天夜夜久久| 亚洲亚洲人成综合网络| 欧美精选一区二区|