亚洲欧美第一页_禁久久精品乱码_粉嫩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 2.12 1993/05/14 21:41:39 gpc-avc Exp gpc-avc $";
#endif

/*
 *
 * $Log: setup.c,v $
 * Revision 2.12  1993/05/14  21:41:39  gpc-avc
 * Changed pdiv to return 1 on div by zero (per Koza)
 *
 * Revision 2.11  1993/04/30  05:01:48  gpc-avc
 * Restructured directories and Makefile
 *
 * Revision 2.9  1993/04/15  09:15:30  gpc-avc
 * deleted code for that was added for regression testing
 *
 *
 */

#include <stdio.h>
#include "gpc.h"
#include "prob.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

{

  /* 
    Assigns function pointers, print names, arity, macro-flag, etc, to 
    function table entries for all populations.  In this case all 
    populations share the same function set.
  */

  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;
    
    pop[p].function_table[4].arity = 4;
    pop[p].function_table[4].macro = TRUE;
    pop[p].function_table[4].enabled = FALSE;
    pop[p].function_table[4].printname = "IFLTE";
    pop[p].function_table[4].code = iflte;
    
  }

}


#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 = 1;

    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 = "F01";
    pop[p].terminal_table[1].constant_generator = random_constant;

    pop[p].terminal_table[2].val = 0;
    pop[p].terminal_table[2].printname = "F02";
    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);
}


/* 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)
  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);
}

(args)
  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一区二区| 青青草97国产精品免费观看无弹窗版| 一区二区视频在线| 亚洲一区二区四区蜜桃| 偷拍与自拍一区| 午夜欧美一区二区三区在线播放| 亚洲一卡二卡三卡四卡五卡| 亚洲一区日韩精品中文字幕| 奇米影视7777精品一区二区| 极品瑜伽女神91| 福利一区福利二区| 色婷婷综合久久久中文字幕| 欧美在线观看视频一区二区| 91麻豆精品国产综合久久久久久| 欧美大片顶级少妇| 国产精品少妇自拍| 亚洲综合一区在线| 男女性色大片免费观看一区二区| 国产一区二区不卡| 91污在线观看| 日韩天堂在线观看| 中文字幕一区二区三区精华液| 一区二区激情视频| 久久爱另类一区二区小说| 成人avav在线| 日韩视频中午一区| 欧美国产日本韩| 午夜精品久久久久影视| 国产精品一区免费在线观看| 一本一道综合狠狠老| 欧美xingq一区二区| 亚洲免费av观看| 精品综合免费视频观看| 色狠狠av一区二区三区| 久久品道一品道久久精品| 亚洲日穴在线视频| 国内精品不卡在线| 成人性生交大片免费看在线播放| 午夜影院久久久| 极品少妇一区二区| 一本一本久久a久久精品综合麻豆| 欧美福利视频一区| 中文字幕综合网| 国产毛片精品视频| 欧美区在线观看| 亚洲欧美另类在线| 国产很黄免费观看久久| 欧美人与z0zoxxxx视频| 日韩一区有码在线| 国产精品伊人色| 4438x成人网最大色成网站| 亚洲人午夜精品天堂一二香蕉| 久草热8精品视频在线观看| 欧美亚洲国产一区二区三区va| 欧美韩国日本综合| 久久亚洲私人国产精品va媚药| 亚洲国产乱码最新视频 | 欧美色区777第一页| 久久精品免费在线观看| 日韩av二区在线播放| 日本韩国视频一区二区| 日韩一区有码在线| 99vv1com这只有精品| 国产精品嫩草影院av蜜臀| 国产一区999| 亚洲精品在线网站| 美国十次了思思久久精品导航| 欧美日韩一级二级三级| 亚洲精品一二三| 在线精品观看国产| 亚洲一区二区在线播放相泽| 91福利小视频| 亚洲一区在线播放| 欧美日韩夫妻久久| 日本成人在线电影网| 91精品国产综合久久福利| 日韩国产在线观看| 欧美一区二区三区在线观看视频| 亚洲成人综合网站| 日韩视频免费观看高清在线视频| 午夜激情综合网| 日韩一区二区精品| 国产精品亚洲人在线观看| 欧美精品一区二区高清在线观看| 激情欧美日韩一区二区| 久久久久久久久久久99999| 国产成人av在线影院| 最近中文字幕一区二区三区| 在线日韩一区二区| 免费观看30秒视频久久| 久久综合久久鬼色中文字| 成人av网站在线| 亚洲自拍偷拍欧美| 欧美一区二区三区人| 黄色日韩网站视频| 亚洲天堂a在线| 7777精品久久久大香线蕉| 国产综合成人久久大片91| 中文一区在线播放| 欧美日韩精品是欧美日韩精品| 婷婷夜色潮精品综合在线| 精品国产髙清在线看国产毛片| 国产麻豆成人传媒免费观看| 亚洲婷婷综合色高清在线| 欧美福利视频一区| 成人av影院在线| 视频一区二区三区入口| 久久精品亚洲精品国产欧美| 日本高清免费不卡视频| 黑人巨大精品欧美一区| 一区二区三区高清不卡| 精品国产一二三区| 欧美偷拍一区二区| 国产成人精品免费网站| 日韩在线一区二区三区| 亚洲人快播电影网| 久久久久久免费毛片精品| 欧美亚洲一区三区| 成人午夜伦理影院| 六月丁香婷婷色狠狠久久| **欧美大码日韩| 精品福利在线导航| 欧美日韩成人综合| 91丨九色丨尤物| 国产福利不卡视频| 美女爽到高潮91| 亚洲国产wwwccc36天堂| 国产精品久久久久aaaa樱花| 91精品中文字幕一区二区三区| 日本精品视频一区二区| 国产成人自拍在线| 久久精品999| 日本午夜精品一区二区三区电影| 国产精品福利一区二区| 国产视频亚洲色图| 日韩欧美国产综合| 欧美一级二级三级蜜桃| 欧美日本在线看| 色老汉一区二区三区| 99久久99久久免费精品蜜臀| 国产99久久久久| 国产成人高清视频| 国产a级毛片一区| 国产又黄又大久久| 久久99精品久久久久久国产越南 | 亚洲精品视频在线看| 国产精品久久久久四虎| 中文字幕不卡在线| 国产精品女人毛片| 亚洲女同一区二区| 日韩毛片一二三区| 一区二区三区资源| 亚洲成人tv网| 日韩国产一区二| 久久精品99国产国产精| 精品一区二区在线看| 国产一区二区福利视频| 国产成人在线免费| 波多野洁衣一区| 色激情天天射综合网| 欧美日韩中文精品| 制服丝袜亚洲播放| 日韩一级完整毛片| 久久久青草青青国产亚洲免观| 国产欧美视频一区二区| 国产精品二区一区二区aⅴ污介绍| 国产精品精品国产色婷婷| 亚洲视频一区在线观看| 亚洲一区av在线| 另类小说一区二区三区| 国产精品自在欧美一区| 99国产精品久久久久久久久久久| 色综合天天综合在线视频| 欧美日韩国产区一| 日韩一级黄色大片| 国产精品色一区二区三区| xnxx国产精品| 国产精品亚洲一区二区三区在线 | 91久久精品一区二区二区| 色哟哟精品一区| 欧美一区二区视频免费观看| 欧美精品一区二区高清在线观看| 国产精品久久久久一区| 亚洲一区av在线| 国产精品小仙女| 欧美色男人天堂| 久久精品一区二区| 亚洲一区在线观看免费观看电影高清| 奇米影视一区二区三区| jlzzjlzz欧美大全| 日韩一区二区三区视频在线 | 一区二区三区在线不卡| 蜜臀av性久久久久蜜臀av麻豆| 成人动漫av在线| 日韩精品在线网站| 亚洲综合在线第一页| 国产精品羞羞答答xxdd |