?? gen.h
字號:
/* 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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -