计算机相关论文范文文献,与格式塔心理学文北京相关毕业论文提纲
本论文是一篇计算机相关毕业论文提纲,关于格式塔心理学文北京相关硕士学位毕业论文范文。免费优秀的关于计算机及格式塔心理学及神经网络方面论文范文资料,适合计算机论文写作的大学硕士及本科毕业论文开题报告范文和学术职称论文参考文献下载。
;,/*遗传矩阵*/unsignedchar*Aimg[Row+1],/*A的备份*/unsignedlongAused[Row+1],unsignedlongAnum[Row+1],unsignedlongAinsnum[Row+1],unsignedlongOpt[Optnum+1][Ins+1],/*最优的解*/unsignedlongOptins[Optnum+1],/*最优解的指令个数*/doubleada[Ins+1],/*行适应度*/charins[Ins+1][Com+1]等于{{0},{0,4,8,20,31,44},{0,8,19,22,29,37},{0,2,16,34,33,32},{0,7,11,35,30},{0,5,13,18,21},{0,1,7,9,23,25},{0,3,5,6,14,24},{0,7,20,21,32,35},{0,9,15,20,45},{0,6,10,39,42,43},{0,1,11,21,34,38},{0,2,4,18,22,37},{0,6,17,25,36},{0,22,33,34,38},{0,2,10,20,37},{0,9,24,29,39},{0,15,18,29,31},{0,4,42,44,45},{0,13,23,26,39},{0,7,12,40,41},{0,12,16,19,28,35},{0,6,23,27,45},{0,33,37,40,41},{0,3,17,19,36},{0,16,33,44,45},{0,13,19,24,25},{0,2,3,5,8},{0,4,7,9,12,43},{0,16,17,20,32},{0,28,33,34,36},{0,10,23,25,27},{0,1,5,44,45},{0,11,15,18,43},{0,7,14,22,36},{0,3,15,25,39}},/*促使*/charinslen[Ins+1]等于{0,15,80,30,12,7,19,32,12,45,36,57,78,65,53,34,48,46,32,26,22,26,19,17,22,10,30,82,73,66,55,24,46,37,77,9},/*指令长度*/unsignedlongstep等于0,voidiniA(void),/*初始化A*/voidadaRate(void),/*适应度*/voidjudge(void),/*判断*/voidelim(void),/*选取:最优的五个解*/voidJC(void),/*交叉*/voidFZ1(void),/*复制*/voidPY1(void),/*变异*/voidback(void),voidshowA(void),/*给出A*/voidshowOpt(void),/*给出最优解*/doublernd(void),/*给出0~1间的随机数*/voidmain(void){randomize(),iniA(),while(1){adaRate(),judge(),elim(),if(step++>,等于times)break,JC(),FZ1(),PY1(),back(),}showOpt(),}voidiniA(void){unsignedlongi,j,knum等于0,for(i等于1,i<,等于Row,i++){A[i]等于(unsignedchar*)malloc(sizeof(char)*(Ins+1)),Aimg[i]等于(unsignedchar*)malloc(sizeof(char)*(Ins+1)),}for(i等于1,i<,等于Row,i++){for(j等于1,j<,等于Ins,j++){if(rnd()>,0.5)A[i][j]等于1,elsea[i][j]等于0,}}for(i等于1,i<,等于Optnum,i++){for(j等于1,j<,等于Ins,j++){Opt[i][j]等于1,Optins[i]+等于inslen[j],}}}voidadaRate(void){unsignedlongi,j,k,doubleinsnum,num,intis[Com+1],/**部件是否出现**/for(i等于1,i<,等于Row,i++){ada[i]等于insnum等于num等于0,for(j等于1,j<,等于Com,j++)is[j]等于0,for(j等于1,j<,等于Ins,j++)if(A[i][j]){insnum+等于inslen[j],for(k等于1,k<,等于Com,k++)is[ins[j][k]]等于1,}for(j等于1,j<,等于Com,j++)if(is[j])num+等于1,if(insnum)ada[i]等于num/insnum,/**适应度函数**/elseada[i]等于0,Anum[i]等于num,Ainsnum[i]等于insnum,}}voidjudge(void){}voidelim(void){unsignedlongi,j,k,for(i等于1,i<,等于Row,i++)/*检查是否有更优解*/if(Anum[i]等于等于Com){for(j等于1,j<,等于Optnum,j++)if(Ainsnum[i]<,Optins[j]){Optins[j]等于Ainsnum[i],for(k等于1,k<,等于Ins,k++)Opt[j][k]等于A[i][k],break,}}}voidJC(void){unsignedlonga,i,j,F,M,/*fsum是行适应度的和*/unsignedcharused,doublefsum等于0,f,m,for(i等于1,i<,等于Row,i++)/*初始化*/{Aused[i]等于0,for(j等于1,j<,等于Ins,j+计算机相关论文范文文献
计算机相关论文范文文献,与格式塔心理学文北京相关毕业论文提纲参考文献资料: