gen.h

来自「GENETIC ALGORITHM FOR NEURAL NETWORKS ON」· C头文件 代码 · 共 63 行

H
63
字号
/* Declarations of general genetic algorithms */#ifndef GEN_H#define GEN_H	1#include "defs.h"char *GenOptStr();char *GenUsage();char GenParamStr[256]; /* CONSTANTS */int Pcopy;	/* % of indiv. to copy per gen. */int Pmutate;	/* % of indiv. to mutate per gen.*/int Pcrossover;	/* % of indiv. to crossover per gen. */	int Ncopy;	/* no. of indiv. to copy per gen. */int Nmutate;	/* no. of indiv. to mutate per gen.*/int Ncrossover;	/* no. of indiv. to crossover per gen. */	int Decimation;	/* initial decimation factor */float DecErrMin;float DecErrAvg;int HashLen;	/* lenth of hashkey 9n bits */int HashSize;	/* size of hashtable *//* Variables set by calcerr */int Nunique;	/* no. of different indiv. */int Nredundant;	/* no. of redundant indiv. */int Nmismatch;	/* no. of mismatches */float ErrMin;float ErrAvg;int TopInd;/* Arrays */ind    *Pop;	/* Poulation */errtyp *Err;	/* errorlist of Populaton *//* Procedures */int handleGenOpt(char opt,char* arg);int initGen(int popsize,int popmem);void randomPop(int popsize);int hashfct(ind x);void clearerrtab();errtyp geterr(int n);void mutate(ind x0,ind x1);void crossover(ind x0,ind y0,ind x1,ind y1);void copy(ind x0,ind x1);void calcerrors(int popsize);void selection(int popsize);#endif

⌨️ 快捷键说明

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