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

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

?? support.cc

?? c++編寫的并行拉馬克遺傳算法的程序。實(shí)現(xiàn)分析對接程序
?? CC
?? 第 1 頁 / 共 2 頁
字號:
//  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
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆精品视频在线观看视频| 一区二区三区四区中文字幕| 久久99精品国产91久久来源| 欧美一区二区女人| 日韩专区欧美专区| 欧美精品一区二区三区蜜桃视频| 美女视频黄免费的久久 | 日韩视频免费直播| 看片的网站亚洲| 久久久久久久久97黄色工厂| 成人午夜av电影| 一区二区三区精品视频在线| 欧美高清视频一二三区| 国精产品一区一区三区mba视频| 国产亚洲午夜高清国产拍精品| 成人精品国产一区二区4080| 亚洲综合成人在线视频| 欧美不卡123| 成+人+亚洲+综合天堂| 亚洲一区二区美女| 精品国产一区二区三区忘忧草| 高清beeg欧美| 亚洲国产欧美日韩另类综合| 精品美女在线播放| 色偷偷成人一区二区三区91| 秋霞午夜鲁丝一区二区老狼| 中文字幕欧美国产| 欧美精品在线一区二区三区| 激情六月婷婷久久| 亚洲一区二区欧美激情| 久久亚洲一区二区三区四区| 一本久久精品一区二区| 韩国一区二区三区| 一区二区三区视频在线观看| 精品国产乱码久久久久久牛牛| 色综合中文字幕国产 | 中文字幕日韩av资源站| 欧美日韩1234| 91在线精品秘密一区二区| 奇米色一区二区三区四区| 最新久久zyz资源站| 欧美成人艳星乳罩| 欧美色网一区二区| 国产成都精品91一区二区三| 日韩—二三区免费观看av| 国产精品免费视频网站| 日韩欧美在线影院| 日本韩国一区二区三区视频| 国产精品一卡二| 天天色天天操综合| 亚洲综合一二三区| 国产精品国产馆在线真实露脸| 精品国产麻豆免费人成网站| 欧美视频在线不卡| 色视频一区二区| 99精品欧美一区二区三区小说| 激情图片小说一区| 久久精品国产99久久6| 天堂在线亚洲视频| 亚洲一级二级在线| 亚洲精品伦理在线| 综合中文字幕亚洲| 国产精品美女久久福利网站| 337p粉嫩大胆色噜噜噜噜亚洲| 欧美日韩精品一区视频| 在线精品视频免费观看| 不卡电影一区二区三区| 成人久久视频在线观看| 国产a精品视频| 国产一区二区不卡在线| 激情欧美一区二区| 黑人巨大精品欧美一区| 久久成人18免费观看| 蜜臂av日日欢夜夜爽一区| 日韩电影在线观看电影| 日韩国产高清影视| 日本不卡的三区四区五区| 蜜臀久久久久久久| 久久er99热精品一区二区| 麻豆精品国产91久久久久久| 老汉av免费一区二区三区| 韩国理伦片一区二区三区在线播放| 男男gaygay亚洲| 久久精品国产第一区二区三区| 九色综合狠狠综合久久| 黄色小说综合网站| 高清不卡在线观看av| 国产v日产∨综合v精品视频| 成人av在线资源网| 色综合久久久久网| 欧美日韩中文字幕精品| 欧美一级二级在线观看| 日韩一区二区在线免费观看| 日韩一卡二卡三卡| 国产女主播一区| 最新热久久免费视频| 亚洲444eee在线观看| 理论片日本一区| 成人一区二区在线观看| 在线观看91视频| 精品国产伦一区二区三区观看方式 | 9191成人精品久久| 精品国产3级a| 亚洲人成精品久久久久久 | 久久先锋影音av鲁色资源网| 国产精品午夜免费| 亚洲综合一区二区精品导航| 日本中文字幕一区二区有限公司| 国产剧情一区在线| 色综合久久99| 欧美www视频| 亚洲色图清纯唯美| 麻豆成人91精品二区三区| 成人精品视频网站| 欧美三级乱人伦电影| 久久久无码精品亚洲日韩按摩| 亚洲色图一区二区| 九九视频精品免费| 色综合视频一区二区三区高清| 日韩免费高清电影| 亚洲另类春色校园小说| 九一久久久久久| 日本乱人伦aⅴ精品| 久久这里都是精品| 亚洲主播在线播放| 国产98色在线|日韩| 欧美日韩极品在线观看一区| 亚洲国产精品成人久久综合一区| 亚洲二区视频在线| 成人精品小蝌蚪| 精品国产乱码久久久久久久| 一区二区三区美女| 国产综合久久久久影院| 欧美久久一二三四区| 国产精品久久影院| 国产在线精品免费| 欧美乱妇一区二区三区不卡视频| 国产精品久久福利| 国产精品综合av一区二区国产馆| 制服视频三区第一页精品| 亚洲美女视频在线观看| 成人不卡免费av| 久久综合资源网| 免费高清视频精品| 欧美日韩国产综合视频在线观看| 日韩毛片一二三区| 国产麻豆午夜三级精品| 欧美大尺度电影在线| 午夜精品久久久久久久 | 91精品欧美综合在线观看最新| 成人欧美一区二区三区小说| 国产传媒久久文化传媒| 日韩精品一区二区三区在线观看 | 国产乱码精品1区2区3区| 欧美一区欧美二区| 亚洲va欧美va人人爽| 欧美午夜精品一区二区蜜桃| 亚洲图片另类小说| 成人av小说网| 中文字幕中文在线不卡住| 国产精品一卡二卡| 国产视频911| 国产高清亚洲一区| 国产欧美日韩视频在线观看| 国产在线国偷精品产拍免费yy| 日韩视频国产视频| 伦理电影国产精品| 精品对白一区国产伦| 九九视频精品免费| 久久久777精品电影网影网| 国产一区二区三区日韩| 久久久精品综合| hitomi一区二区三区精品| 国产精品丝袜一区| 97久久人人超碰| 亚洲综合一区二区| 91精品久久久久久蜜臀| 久久99久久99| 国产午夜亚洲精品不卡 | 色综合天天综合色综合av| 亚洲精品日韩综合观看成人91| 在线观看一区日韩| 日韩激情中文字幕| 久久久久久免费网| 波多野结衣中文字幕一区二区三区| 1000部国产精品成人观看| 欧美影片第一页| 久久99热99| 国产精品久久久久久久蜜臀 | 欧美日韩精品一二三区| 裸体在线国模精品偷拍| 欧美激情一区二区三区在线| 91麻豆国产福利在线观看| 日韩精品免费视频人成| 久久伊人中文字幕| 日本乱码高清不卡字幕| 蜜臀av在线播放一区二区三区| 中文字幕av免费专区久久| 日本电影欧美片| 久久99热这里只有精品|