define.h
来自「遗传算法程序求函数极值点,可调交叉和变异个数」· C头文件 代码 · 共 12 行
H
12 行
#include<math.h>
#define f1(x,y) (sin(x)/x)*(sin(y)/y)//弧度
#define f2(x,y) 0.9*exp(-(pow(x+5,2)+pow(y+5,2))/10)+0.99996*exp(-(pow(x-5,2)+pow(y-5,2))/20)
#define f3(x,y) x+y
#define POPULATION_SIZE 50
#define CROSSOVER_NUMBER MAX_GENE_NUM/2
#define MUTATION_NUMBER 4
#define MAXGENERATION 100
#define UPPERLIMIT 10
#define LOWERLIMIT -10
#define MAX_GENE_NUM 18
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?