亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? support.cc

?? c++編寫的并行拉馬克遺傳算法的程序。實(shí)現(xiàn)分析對(duì)接程序
?? CC
?? 第 1 頁 / 共 2 頁
字號(hào):
//  These are the member functions for the support classes./*** $Log$*/#include "eval.h"#ifdef sgi    #include <stdio.h>    #include "support.h"    #include "stateLibrary.h"    #include "structs.h"#else    extern "C"    {	#include <stdio.h>	#include "support.h"	#include "stateLibrary.h"	#include "structs.h"    }#endifextern FILE *logFile;extern class Eval evaluate;Population::Population(Population &original): lhb(original.lhb), size(original.size){   register int i;#ifdef DEBUG   (void)fprintf(logFile, "support.cc/Population::Population(Population &original)\n");#endif /* DEBUG */   heap = new Individual[size];   for (i=0; i<size; i++) {      heap[i] = original.heap[i];      heap[i].age = 0L; // gmm, 1998-07-14   }}/*  Heap Functions:  In this case, the heap condition means the maximal     element wrt fitness (i.e. the best) is at the top of the heap.  lhb     is the index of the last element to be inserted into the heap.  Some     the standard functions on the heap can be accomplished in the following     manner:       Root = size - 1  (Note: that the root is fixed)       LeftChild(I) = 2I - size       RightChild(I) = 2I - size - 1       Parent(I) = (I + size + 1)/2    It is important to notice that the heap condition is maintained from    lhb to size-1 *in reverse order*.*/void Population::swap(Individual &individual1, Individual &individual2){   Individual temp;#ifdef DEBUG   (void)fprintf(logFile, "support.cc/void Population::swap(Individual &individual1, Individual &individual2)\n");#endif /* DEBUG */   temp = individual1;   individual1 = individual2;   individual2 = temp;}/*  This routine assumes that the heap condition is satisfied    between lhb and size-1 and that the new individual is in    position lhb-1.*/void Population::SiftUp(void){   int i, parent;#ifdef DEBUG   (void)fprintf(logFile, "support.cc/void Population::SiftUp(void)\n");#endif /* DEBUG */   i = lhb-1;   while (((parent=(i+size+1)/2)<size)&&(heap[parent].value(Normal_Eval)>heap[i].value(Normal_Eval))) {      swap(heap[parent], heap[i]);      i = parent;   }   lhb--;}/*  This routine assumes that the heap condition is satisfied    between lhb & size-2 initially, and that the individual at size-1    needs to be accomodated.*/void Population::SiftDown(void){   int i, child;#ifdef DEBUG   (void)fprintf(logFile, "support.cc/void Population::SiftDown(void)\n");#endif /* DEBUG */   i = size-1;   while ((child=2*i-size)>=lhb) {      if (child-1>=lhb) {         if (heap[child-1].value(Normal_Eval)<heap[child].value(Normal_Eval)) {            child--;         }      }      /*  Now child holds the index of the best child of i  */      if (heap[i].value(Normal_Eval)<heap[child].value(Normal_Eval)) {         break;      } else {         swap(heap[child], heap[i]);         i = child;      }   }}void Population::msort(int m){   register int i;#ifdef DEBUG   (void)fprintf(logFile, "support.cc/void Population::msort(int m=%d)\n",m);#endif /* DEBUG */   //  First make a heap of the whole array, i.e lhb = 0 & uhb = size   lhb = size-1;   while (lhb>0) {      SiftUp();   }   //  Now place the m best members at the beginning of the array   for (i=0; i<m; i++) {      swap(heap[i], heap[size-1]);      lhb++;      SiftDown();   }      //  Assert: heap[0..m-1] sorted}//void Population::print(ostream &output, int num)//{   //register int i;//#ifdef DEBUG   //(void)fprintf(logFile, "support.cc/void Population::print(ostream &output, int num=%d)\n",num);//#endif /* DEBUG */   //(void)fprintf(logFile, "The top %d individuals in the population:/n", num);   //for (i=0; i<num; i++) {      //(void)fprintf(logFile,"%lf\n", heap[i].value(Normal_Eval));   //}//}void Population::print(FILE *output, int num) {   register int i;#ifdef DEBUG   (void)fprintf(logFile, "support.cc/void Population::print(FILE *output, int num=%d)\n",num);#endif /* DEBUG */   (void)fprintf( output, "The top %d individuals in the population:\n\n", num);   for (i=0; i<num; i++) {      (void)fprintf( output, "(%d):\t %8.2f\n", i+1, heap[i].value(Normal_Eval));   }}void Population::printPopulationAsStates(FILE *output, int num, int ntor) {   register int i;#ifdef DEBUG2   register int j;#endif /* DEBUG2 */   double thisValue;#ifdef DEBUG   (void)fprintf(logFile, "support.cc/void Population::printPopulationAsStates(FILE *output, int num=%d, int ntor=%d)\n",num,ntor);#endif /* DEBUG */   (void)fprintf( output, "The top %d individuals in the population:\n\n", num);   for (i=0; i<num; i++) {      thisValue = heap[i].value(Normal_Eval);      (void)fprintf( output, "(%d):\nEnergy= %8.2le\n", i+1, thisValue);      heap[i].printIndividualsState(output, ntor);#ifdef DEBUG2      if (!finite(thisValue) || ISNAN(thisValue)) {//debug	  // Convert state to coords and print it out...//debug	  cnv_state_to_coords(heap[i].state(ntor), heap[i].mol->vt,  heap[i].mol->tlist,  ntor, heap[i].mol->crdpdb,  heap[i].mol->crd,  heap[i].mol->natom);//debug	  for (j=0; j<heap[i].mol->natom; j++) {//debug	    (void)fprintf( logFile, "ATOM  %5d  C   RES     1    %8.3f%8.3f%8.3f %+8.2f %+6.2f\n", i+1, heap[i].mol->crd[i][X], heap[i].mol->crd[i][Y], heap[i].mol->crd[i][Z], 0., 0.); //debug	  }/*j*///debug      }// thisValue is either infinite or not-a-number.//debug#endif /* DEBUG2 */   }// i}Genotype::Genotype(unsigned int init_number_of_vectors, Representation **init_rep_vector): number_of_vectors(init_number_of_vectors), rep_vector(init_rep_vector),  modified(0){   register int i, j, k;#ifdef DEBUG   (void)fprintf(logFile, "support.cc/Genotype::Genotype(unsigned int init_number_of_vectors=%d, Representation **init_rep_vector)\n",init_number_of_vectors);#endif /* DEBUG */   number_of_genes = 0;   for (i=0; i<number_of_vectors; i++) {      number_of_genes += rep_vector[i]->number_of_points();   }    i=0;   lookup = new Lookup[number_of_genes];   for (j=0; j<number_of_vectors; j++) {      for (k=0; k<rep_vector[j]->number_of_points(); k++) {         lookup[i].vector = j;         lookup[i].index = k;         i++;      }   }}Genotype::Genotype(const Genotype &original){   register int i;#ifdef DEBUG   (void)fprintf(logFile, "support.cc/Genotype::Genotype(Genotype &original)\n");#endif /* DEBUG */   number_of_genes = original.number_of_genes;   number_of_vectors = original.number_of_vectors;   modified = original.modified;   if (original.rep_vector!=NULL) {      rep_vector = new Representation*[number_of_vectors];      lookup = new Lookup[number_of_genes];   } else {      rep_vector = NULL;      lookup = NULL;   }   for (i=0; i<number_of_vectors; i++) {      rep_vector[i] = original.rep_vector[i]->clone();   }   for (i=0; i<number_of_genes; i++) {      lookup[i] = original.lookup[i];   }}Genotype::~Genotype(void){   register int i;#ifdef DEBUG   (void)fprintf(logFile, "support.cc/Genotype::~Genotype(void)\n");#endif /* DEBUG */   if (rep_vector!=NULL) {      for (i=0; i<number_of_vectors; i++) {         delete rep_vector[i];      }      delete [] rep_vector;      delete [] lookup;   }}Genotype &Genotype::operator=(const Genotype &original){   register int i;#ifdef DEBUG   (void)fprintf(logFile, "support.cc/Genotype &Genotype::operator=(const Genotype &original)\n");#endif /* DEBUG */   if (rep_vector!=NULL) {      for (i=0; i<number_of_vectors; i++) {         delete rep_vector[i];      }      delete [] rep_vector;      delete [] lookup;   }   number_of_vectors = original.number_of_vectors;   number_of_genes = original.number_of_genes;//   modified = original.modified;   modified = 1;   if (original.rep_vector!=NULL) {      rep_vector = new Representation *[number_of_vectors];      lookup = new Lookup[number_of_genes];   } else {      rep_vector = NULL;      lookup = NULL;   }   for (i=0; i<number_of_vectors; i++) {      rep_vector[i] = original.rep_vector[i]->clone();   }   for (i=0; i<number_of_genes; i++) {      lookup[i] = original.lookup[i];   }   return(*this);}void Genotype::write(Element value, int gene_number){#ifdef DEBUG   (void)fprintf(logFile, "support.cc/void Genotype::write(Element value, int gene_number=%d)\n",gene_number);#endif /* DEBUG */   modified = 1;   rep_vector[lookup[gene_number].vector]->write(value, lookup[gene_number].index);}void Genotype::write(unsigned char value, int gene_number){

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人激情午夜影院| 久久成人综合网| 欧美在线免费播放| 夜夜精品浪潮av一区二区三区| 成人av免费在线播放| 一区二区中文视频| 在线观看91视频| 日本va欧美va欧美va精品| 精品剧情v国产在线观看在线| 国产在线视视频有精品| 日本一区二区三区在线不卡| 99re这里都是精品| 午夜一区二区三区在线观看| 欧美成人一区二区三区| 国产东北露脸精品视频| 亚洲精品一二三区| 制服视频三区第一页精品| 青青草一区二区三区| 国产日韩欧美一区二区三区乱码| proumb性欧美在线观看| 午夜欧美在线一二页| 精品少妇一区二区三区在线视频 | 欧美日韩亚洲丝袜制服| 天堂资源在线中文精品| 欧美r级在线观看| 91蜜桃婷婷狠狠久久综合9色| 亚洲1区2区3区视频| 久久丝袜美腿综合| 一本色道综合亚洲| 六月婷婷色综合| 亚洲视频狠狠干| 91精品免费观看| 成人精品电影在线观看| 日韩电影免费在线| 综合激情网...| 精品国产自在久精品国产| 波多野结衣中文字幕一区| 亚洲国产日韩在线一区模特| 国产日本欧洲亚洲| 91精品国产综合久久精品app| 丁香婷婷综合色啪| 日韩中文字幕av电影| 中文字幕在线观看一区| 日韩一区二区在线看| 色婷婷综合久久久久中文| 日本欧美一区二区三区乱码| 亚洲日本青草视频在线怡红院| 欧美v日韩v国产v| 欧美日韩精品欧美日韩精品一 | 国内精品久久久久影院一蜜桃| 中文字幕亚洲精品在线观看 | 国产日韩精品一区| 欧美三区免费完整视频在线观看| 国产成人精品亚洲777人妖| 日本伊人色综合网| 亚洲女人的天堂| 国产欧美一区二区在线| 日韩一级在线观看| 精品视频1区2区3区| 成人激情小说网站| 国产成人日日夜夜| 久久国产综合精品| 亚洲国产成人91porn| 亚洲九九爱视频| 国产精品国产三级国产aⅴ原创| 欧美精品一区二区不卡| 日韩亚洲欧美高清| 欧美老肥妇做.爰bbww视频| 91福利视频久久久久| 色中色一区二区| 日本乱码高清不卡字幕| 色拍拍在线精品视频8848| 色综合天天天天做夜夜夜夜做| 国产99精品在线观看| 国产成人aaa| 国产不卡在线视频| 成人国产电影网| 99久久精品国产一区| 色综合久久中文字幕| 91国偷自产一区二区三区观看 | 91麻豆自制传媒国产之光| 波多野结衣亚洲一区| 成人午夜av电影| 成人av片在线观看| 99精品在线观看视频| 99re成人在线| 在线观看日韩电影| 欧美日韩午夜在线| 91精品国产91久久综合桃花| 日韩欧美专区在线| 久久蜜桃av一区精品变态类天堂 | 日韩欧美不卡一区| www精品美女久久久tv| 久久女同精品一区二区| 国产精品免费av| 一区二区不卡在线播放| 亚洲v精品v日韩v欧美v专区| 免费久久99精品国产| 国产精品白丝jk白祙喷水网站| av午夜一区麻豆| 欧美性xxxxxxxx| 精品久久一区二区| 日韩一区中文字幕| 午夜精品一区在线观看| 国产毛片精品一区| a美女胸又www黄视频久久| 在线欧美日韩精品| 欧美xxx久久| 中文字幕亚洲欧美在线不卡| 亚洲国产精品久久久久婷婷884| 美女视频黄 久久| 成人avav在线| 在线成人免费视频| 欧美国产激情二区三区| 亚洲大型综合色站| 国产99精品国产| 欧美日韩一本到| 中文字幕高清不卡| 男女激情视频一区| 91在线观看下载| 欧美一区日本一区韩国一区| 亚洲国产高清aⅴ视频| 午夜免费久久看| 不卡视频在线观看| 日韩一级黄色大片| 一二三四社区欧美黄| 国产电影一区二区三区| 欧美日韩三级一区二区| 国产精品理论片在线观看| 欧美aaa在线| 一本色道久久综合亚洲精品按摩| 日韩欧美亚洲另类制服综合在线| 亚洲欧洲精品一区二区精品久久久| 日韩精品成人一区二区在线| www.日韩av| 亚洲精品一区二区三区99| 亚洲国产wwwccc36天堂| 91丨porny丨中文| 国产香蕉久久精品综合网| 天天综合天天做天天综合| 99久久综合精品| 久久久99免费| 黄页视频在线91| 制服丝袜激情欧洲亚洲| 亚洲国产一区二区视频| 国产91色综合久久免费分享| 日韩视频永久免费| 午夜精品久久久久久久久久久| 99综合影院在线| 中文久久乱码一区二区| 精品一区二区三区影院在线午夜| 在线播放日韩导航| 亚洲成人综合网站| 欧美视频三区在线播放| 亚洲激情一二三区| 91麻豆精东视频| 中文字幕佐山爱一区二区免费| 成人蜜臀av电影| 中文欧美字幕免费| 成人免费高清视频在线观看| 国产欧美日本一区视频| 国产福利一区二区三区视频在线| 2021国产精品久久精品| 精品中文字幕一区二区小辣椒| 制服丝袜中文字幕一区| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美一区二区三区在线看| 日韩成人免费看| 日韩欧美综合一区| 精品一区二区免费| 久久精品人人做人人爽人人| 国产一区二区三区精品视频| 久久久久国产免费免费| 国产99久久久精品| 中文字幕乱码日本亚洲一区二区| 国产成人在线网站| 国产精品国产自产拍高清av王其| www.激情成人| 亚洲午夜久久久久久久久电影院| 欧美人体做爰大胆视频| 日本视频在线一区| 欧美精品一区二区不卡| 成人精品电影在线观看| 亚洲精品少妇30p| 欧美精品丝袜中出| 精品一区二区成人精品| 日本一区二区成人| 91国产福利在线| 蜜臀av性久久久久av蜜臀妖精| 久久看人人爽人人| 91片在线免费观看| 日韩和的一区二区| 久久久777精品电影网影网 | 亚洲777理论| 久久一区二区三区国产精品| 成人av中文字幕| 香蕉乱码成人久久天堂爱免费| 欧美videos中文字幕| 99综合电影在线视频| 婷婷综合另类小说色区|