⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 list.h

📁 标准的GP源代码,由Andy Singleton维护
💻 H
字号:
#ifndef LIST_LIB#define LIST_LIB true// list.h   Include file for list.cc etc// W. Langdon cs.ucl.ac.uk 24 January 1995// version "$Revision: 1.31 $"//#define ORIGINAL_PRINT_MATCH true//#define ORIGINAL_RANK true -- not used in any kit//Modifications (in reverse order)//WBL  4 Apr 1997  For Easter 1997 release of GPdata//                 define DIRECTEDXOVER//                 Restore loop limit, print_match_length_score,//                 mem and cpu penalties from r1.23//                 Bring into line for use as prob.h file//WBL  2 Sep 1995  BUGFI -Wall -WinlineX add VAR_TIMINGS//WBL 31 Aug 1995  Disable CPU and Memory penalties//WBL 31 Aug 1995  Add MAX_BREAKS Allow store_fit to work without stop_on_error//WBL 30 Aug 1995  Allow nested loops//WBL  8 Aug 1995  Add macro ORIGINAL_PRINT_MATCH//WBL  6 Aug 1995  Restore print_match_length_score functionality//                 (from r1.23 for tests in directory 27*-jun-95)//                 Make num_sol_found global so can be saved in dumpfile//WBL 28 May 1995  Reduce CPU penalty by increasing cpu_penalty_bot//WBL  3 May 1995  Add STORE_FIT. Reduce NUM_TEST_SEQUENCES//WBL  2 May 1995  Add TRACE_RUN//WBL 29 Apr 1995  Reduce F_tan_spread from 31.4 to 15.0//WBL 23 Apr 1995  Add cpu_penalty_bot etc//WBL 22 Apr 1995  Add ADF_CACHE//WBL 20 Apr 1995  Add TIMINGS//WBL 18 Apr 1995  Remove adf2//WBL  8 Apr 1995  Add Insert_adf,Delete_adf,Locate_adf,Printlist_adf//WBL 31 Mar 1995  Add adf1, adf2//WBL 22 Mar 1995  Add num_ellite_pareto//WBL 21 Feb 1995  Fix array bounds bug in store and use same size as queue2//WBL 16 Feb 1995  Add scoretype and print_scorexxxx//WBL 11 Feb 1995  Remove abort_on_error etc//WBL 23 Jan 1995  New file based upon queue2.h rev 1.8// uniform argument and return type for "closure"typedef int retval;                                     //WBL for stack#define PARETO#define setmaxfit(xparams) max_fitness /*dummy nop*/#define MULTREE#define NUM_TREES 15#define MAXTREEDEPTH 0#define ADF true#define BYREF true#define TIMINGS true//#define VAR_TIMINGS true#define TRACE_RUN true#define ADF_CACHE true#define STORE_FIT true//STORE_FIT requires MULTREE and TRACE#define NUM_OPERATIONS 10#define NUM_OTHERS 2#define num_pareto_components (NUM_OPERATIONS+NUM_OTHERS)#define num_ellite_pareto      NUM_OPERATIONS//#define pareto_fitness(x) &(x->hits[0])#define pareto_fitness(x,i) (x->hits[i])#define store_limit 32#define Array_bot   (-15)#define Array_top   15#define F_tan_spread 15.0#define max_iterates 32#define loop_max_depth 1#define print_buffer_size 10inline float print_match_max_score   (int x) {return ((x==0)? 0.05 : 1.0);}inline float print_match_length_score(int x, int y) {#ifdef ORIGINAL_PRINT_MATCH	return ((x!=y)? 0.0 : (x==0)? 0.05 : 0.2);}#else	return ((x==0)? 0.05:0.2) * ((x==y)? 1.0:0.5/abs(x-y));}#endifinline float print_match_item_score  (int x) {return (0.4/(x));}inline float print_match_order_score (int x) {return (0.4/(x));}typedef float scoretype;#define mem_penalty_bot 12#define cpu_penalty_bot 120.0//do not define ADF or BYREF#define MAX_BREAKS         172#define NUM_TEST_SEQUENCES 21#define NUM_TEST_PHASES    2//not actually problem dependant but keep include files a bit cleanerretval random_value(int& seed); //seed > 0enum{Makenull,Retrieve,Insert,Delete,End,First,Next,Previous,Locate,Printlist,     adf1,Insert_adf,Delete_adf,Locate_adf,Printlist_adf};#define first_op Makenull#define last_op  Printlistextern const int  tree_arg_num     [last_op+1];extern const BOOL tree_return_value[last_op+1];extern      float max_fitness;extern      int end_gens(); //see if need to move to the next test phase                             //return <> 0 if wish to save a bench pointextern      num_sol_found; //for save and restore to dumpfile//Restore original "rectangular deme" described in thesis#define ORIGINAL_DEME true#define DIRECTEDXOVER true#endif /*LIST_LIB*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -