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

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

?? setup.c

?? 簡單遺傳算法經典例子!! SGPC: Simple Genetic Programming in C by Walter Alden Tackett and Aviram Carmi
?? 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.7 1993/05/14 21:41:18 gpc-avc Exp gpc-avc $";
#endif

/*
 *
 * $Log: setup.c,v $
 * Revision 1.7  1993/05/14  21:41:18  gpc-avc
 * Changed pdif to reurn 1 on div by zero (per Koza)
 *
 * Revision 1.6  1993/04/30  05:10:02  gpc-avc
 * Restructured directories and Makefile
 *
 * Revision 1.4  1993/04/14  04:04:56  gpc-avc
 * Finished mods for checkpointing
 *
 *
 */

#include <stdio.h>
#include <math.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 = 6;
    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 = TRUE;
    pop[p].function_table[4].printname = "IFLTE";
    pop[p].function_table[4].code = iflte;
    
    pop[p].function_table[5].arity = 2;
    pop[p].function_table[5].macro = FALSE;
    pop[p].function_table[5].enabled = TRUE;
    pop[p].function_table[5].printname = "ATG";
    pop[p].function_table[5].code = atg;
    
  }
}


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

  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[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 atg(
  GENERIC *args
  )
#else

GENERIC atg(args)
  GENERIC *args;
#endif
{
  /* the damn thing does not like atan2(0.0,0.0) eventhough the man page
     for atan says: "atan2(0.0,0.0) is +-0.0 or +-pi, in conformance
     with 4.3BSD, as discussed in the Floating-Point Programmers Guide.
   */

  if ((args[0] == 0.0) && (args[1] == 0.0)) return (GENERIC)0.0;
  return (GENERIC)atan2((double)args[0], (double)args[1]);
}

#ifdef ANSI_FUNC

GENERIC random_constant(void)
#else

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

.0) && (args[1] == 0.0)) return (GENERIC)0.0;
  return (GENERIC)atan2((double)args[0], (double)args[1]);
}

#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一区二区三区免费野_久草精品视频
久久精品视频一区二区| 欧美成人精品1314www| 激情另类小说区图片区视频区| 亚洲国产另类av| 一区二区三区高清在线| 亚洲精品综合在线| 亚洲综合在线五月| 亚洲成人精品在线观看| 亚洲国产精品视频| 日韩国产精品久久久久久亚洲| 五月婷婷久久丁香| 日韩和欧美的一区| 国内精品伊人久久久久影院对白| 国产一区二区三区香蕉| 国产不卡视频在线观看| 色婷婷综合久久久中文一区二区 | 精品在线观看免费| 欧美a级一区二区| 激情欧美日韩一区二区| 成人性生交大片免费| 色综合久久久久| 欧美精品第1页| 久久久精品黄色| 亚洲女同一区二区| 蜜臀久久99精品久久久久宅男| 经典三级视频一区| 91色在线porny| 91麻豆精品国产自产在线观看一区 | 日本午夜精品视频在线观看| 激情欧美一区二区| 99精品久久久久久| 欧美一级黄色录像| 亚洲三级小视频| 日韩福利视频导航| heyzo一本久久综合| 91精品国产综合久久香蕉麻豆 | 成人性色生活片| 欧美在线观看视频一区二区三区| 精品伦理精品一区| 一区二区三区日韩在线观看| 国产一区二区在线视频| 在线观看视频一区| 久久久五月婷婷| 青青国产91久久久久久| 丁香天五香天堂综合| 91精品国产麻豆国产自产在线 | 成人av资源在线观看| 欧美日韩国产bt| 中文字幕在线视频一区| 日韩精品成人一区二区三区| 色女孩综合影院| 国产欧美日韩久久| 美女一区二区视频| 欧美日韩精品一区二区三区| 国产欧美精品一区| 精品在线观看免费| 欧美精品丝袜中出| 亚洲午夜一区二区| 99久久久无码国产精品| 欧美国产一区视频在线观看| 久久国产精品99精品国产 | 日本一区二区成人在线| 国产一区二区三区电影在线观看| 欧美区一区二区三区| 亚洲综合久久av| 99久久精品国产精品久久 | 99久精品国产| 久久综合成人精品亚洲另类欧美 | 国产露脸91国语对白| 7777精品久久久大香线蕉| 亚洲国产精品久久人人爱 | 麻豆精品国产传媒mv男同| 欧洲生活片亚洲生活在线观看| 亚洲欧洲另类国产综合| 成人免费的视频| 国产精品无圣光一区二区| 国产成人免费在线视频| 欧美高清在线一区| 91香蕉视频mp4| 亚洲综合一区二区三区| 欧美影院一区二区| 日日夜夜精品视频天天综合网| 欧美日韩三级视频| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美精品一二三| 精品一区二区三区在线观看| 久久影院午夜片一区| 福利电影一区二区| 亚洲欧美综合另类在线卡通| 色偷偷成人一区二区三区91| 亚洲国产精品一区二区www在线| 制服.丝袜.亚洲.中文.综合| 日韩成人午夜电影| 久久久久免费观看| 91性感美女视频| 丝袜美腿成人在线| 26uuu精品一区二区三区四区在线| 国产一区视频导航| 综合激情网...| 3d成人h动漫网站入口| 国产一区二区三区四区五区入口 | 国产精品久久久久婷婷二区次| 成人动漫精品一区二区| 亚洲一区二区欧美| 久久综合色一综合色88| 色综合久久久久| 久久99蜜桃精品| 亚洲免费观看在线视频| 91精品国产综合久久香蕉麻豆| 国产成人久久精品77777最新版本| 亚洲另类色综合网站| 日韩一区二区三区免费看 | 日韩免费观看2025年上映的电影| 国产伦精品一区二区三区免费| 国产精品美女久久福利网站 | 日韩成人精品在线观看| 久久精品亚洲一区二区三区浴池| 色播五月激情综合网| 国产一区二区伦理片| 午夜精品久久久久久久蜜桃app| www激情久久| 欧美电影一区二区三区| 色综合久久九月婷婷色综合| 国产精品一二三四五| 亚洲r级在线视频| 亚洲欧美一区二区不卡| 欧美xxxxx裸体时装秀| 欧美性感一区二区三区| 国产成人午夜片在线观看高清观看| 五月天亚洲婷婷| 亚洲网友自拍偷拍| 一区在线观看视频| 日本一区二区电影| 国产农村妇女毛片精品久久麻豆| 日韩免费在线观看| 欧美一区二区三区日韩视频| 欧美影院精品一区| 欧美午夜在线一二页| 99re热视频这里只精品| 国产xxx精品视频大全| 精品亚洲aⅴ乱码一区二区三区| 亚洲一区二区在线免费看| 亚洲乱码国产乱码精品精98午夜 | 国产激情一区二区三区四区| 免费一级片91| 美女脱光内衣内裤视频久久网站| 亚洲一区二区四区蜜桃| 亚洲乱码一区二区三区在线观看| 国产精品污网站| 中文字幕精品一区二区精品绿巨人| 久久综合久久99| 欧美精品一区视频| www国产亚洲精品久久麻豆| 精品国产乱码久久久久久图片| 欧美一区二区三区男人的天堂| 在线播放中文一区| 日韩视频免费观看高清完整版 | 久久精品国产一区二区三区免费看| 亚洲电影你懂得| 天天做天天摸天天爽国产一区 | 极品美女销魂一区二区三区免费 | 国产欧美日韩久久| 国产精品久久久爽爽爽麻豆色哟哟| 日本一区二区免费在线| 国产精品女主播在线观看| 国产精品久久久久永久免费观看| 亚洲三级理论片| 亚洲成人动漫在线免费观看| 日韩精品成人一区二区三区| 精品一区二区三区在线播放| 懂色av噜噜一区二区三区av | 青娱乐精品视频| 狠狠狠色丁香婷婷综合久久五月| 国产乱码字幕精品高清av| 99久久伊人精品| 欧美午夜精品一区二区三区 | 成人午夜又粗又硬又大| 一本久久综合亚洲鲁鲁五月天 | 久久精品国产澳门| 高清免费成人av| 色欧美88888久久久久久影院| 欧美军同video69gay| 精品国产伦理网| 亚洲精品免费电影| 玖玖九九国产精品| 色狠狠综合天天综合综合| 欧美电影在线免费观看| 欧美极品xxx| 奇米影视7777精品一区二区| 成人精品小蝌蚪| 日韩你懂的电影在线观看| 中文字幕色av一区二区三区| 视频一区在线播放| 99麻豆久久久国产精品免费优播| 欧美久久一二区| 亚洲人妖av一区二区| 九九视频精品免费| 欧美日韩一区高清| 成人欧美一区二区三区白人| 久久www免费人成看片高清|