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

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

?? btc_general_unix.cpp

?? This CD-ROM is distributed by Kluwer Academic Publishers with ABSOLUTELY NO SUPPORT and NO WARRANTY
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
   else if ( SNR[w] == 1.0) 
   loop = 1e+1;
   else if ( SNR[w] == 1.5)
   loop = 2e+1;
   else if ( SNR[w] == 2.0) 
   loop = 6e+1;
   else if( SNR[w] == 2.5)
   loop = 2e+2;
   else if ( SNR[w] == 3.0)
   loop = 1e+3;
   else  
   loop = 1e+5;

   while (times < loop){
     Uptr = encoder.get_U();
     for ( i = 0; i < k; i++)
       for ( j = 0; j < k; j++)
	 U[i][j] = Uptr[58*i + j];
     
     Y_H_Vptr = encoder.get_Y_H_V();
     for ( i = 0; i < n; i++)
       for ( j = 0; j < n; j++)
	 Y_H_V[i][j] = Y_H_Vptr[65*i + j];
     
     iter = 0;
     while ( iter < iteration)
       {
	 
	 for (i = 0; i < n; i++)
	   for (j = 0; j < n; j++)
	     Lu[i][j] = Le_V[i][j];
	   
 // ##### Below is the computation of Forwardmatric and Backwardmatric for Horizontal ##### 

     node[0].setForwardmatric(1);

     for ( d = 0; d < n; d++)
       {
	 for (i = 0; i < n; i++){
	   for (j = 0; j < n; j++){
	     Lxy[i][j] = Lc*Y_H_V[i][j] + Lu[i][j];
	   }
	 }
	 for (i = 1; i < n + 1 ; i++){  //start to calaulate alpha, i is each time point
	   for ( j = 1; j <= ( int)pow(2, statecomplexfile[i]); j++)
	     {
	       counterbranch = startbranchindex[i-1];
	       nodenum = startnodeindex[i] - 1 + j;
	       temp1 = 0.0; temp2 = 0.0; t = 0.0; counter = 0; 
	       while ( counterbranch < startbranchindex[i])
		 {
		   if (branch[counterbranch].getDestinationnode() == nodenum)
		     {
		       counter++; 
		       if (counter == 1){ 
			 temp1 = log(node[branch[counterbranch].getOriginalnode()].getForwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][i-1];
			 temp2 = exp(temp1);}
		       else if (counter == 2)
			 { 
			   temp1 = log(node[branch[counterbranch].getOriginalnode()].getForwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][i-1];
			   temp2 = temp2 + exp(log(node[branch[counterbranch].getOriginalnode()].getForwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][i-1]);
			 }
		       counterbranch++;
		     }
		   else 
		     counterbranch++;
		 }      
	       node[nodenum].setForwardmatric(temp2);
	     }
	 }
	 
	 //+++++++++++++++++++ Below is the case for the last node: time(i) = n ++++++++++++++++++++++++
	
	 temp1 = log(node[branch[counterbranch].getOriginalnode()].getForwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][n-1];
	 temp2 = log(node[branch[counterbranch + 1].getOriginalnode()].getForwardmatric()) + 0.5*branch[counterbranch + 1].getBit()*Lxy[d][n-1];
	 temp2 = exp(temp1) + exp(temp2);
	 node[nodenum].setForwardmatric(temp2);
	
//========================== start the computation of Beta ===========================
 
	  node [nodenumber].setBackwardmatric(1);// nodenumber is the number of the last node
	 temp1 = 0.0; temp2 = 0.0; t = 0.0; counter = 0;
	 i = n-1;     //start to calaulate beta for backward, i is each time point
	 for ( j = 0; j < ( int)pow(2, statecomplexfile[i]); j++)
	   {
	     counterbranch = startbranchindex[i];// there are 2 branches going to the last node
	     nodenum = startnodeindex[i] + j;
	     temp1= log(node[branch[counterbranch+j].getDestinationnode()].getBackwardmatric()) + 0.5* branch[counterbranch+j].getBit()*Lxy[d][n-1];
	     temp2 = exp(temp1);
	     node[nodenum].setBackwardmatric(temp2);
	   }
	 for (i = n - 2; i > -1; i--)
	   {
	     for (j = 0; j < (int)pow(2, statecomplexfile[i]); j++)
	       {
		 counterbranch = startbranchindex[i];
		 
		 nodenum = startnodeindex[i] + j;
		 counter = 0;
		 while ( counterbranch < startbranchindex[i+1])
		   {
		     if (branch[counterbranch].getOriginalnode() == nodenum)
		       {
			 counter++;
			 if (counter == 1){
			   temp1 = log(node[branch[counterbranch].getDestinationnode()].getBackwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][i];
			   temp2 = exp(temp1);
			 }
			 else if (counter == 2)
			   {
			     temp1 = log(node[branch[counterbranch].getDestinationnode()].getBackwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][i];
			     temp2 = temp2 + exp(log(node[branch[counterbranch].getDestinationnode()].getBackwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][i]);
			   }
			 counterbranch++;
		       }
		     else
		       counterbranch++;
		   }
		 node[nodenum].setBackwardmatric(temp2);
	       }
	   }
	
	 //++++++ Below is the computation for the Extrinsic value with forward tracing value and backward tracing value ++++++
	 
	 double Le_H_positive[65][65], Le_H_negative[65][65];
	 for (i =0; i < n; i++)
	   for ( j = 0; j < n; j++)
	     Le_H_positive[i][j] = Le_H_negative[i][j] = 0;
	 for (i =0; i < n; i++){
	   if (statecomplexfile[i+1] >= statecomplexfile[i]){
	     counterbranch = startbranchindex[i];
	     while ( counterbranch < startbranchindex[i+1])
	       {
		 if (branch[counterbranch].getBit() == 1){
		   Le_H_positive[d][i] =Le_H_positive[d][i] + ( node[branch[counterbranch].getOriginalnode()].getForwardmatric())* (node[branch[counterbranch].getDestinationnode()].getBackwardmatric());
		   counterbranch++;}
		 else {
		   Le_H_negative[d][i] =Le_H_negative[d][i] + ( node[branch[counterbranch].getOriginalnode()].getForwardmatric())* (node[branch[counterbranch].getDestinationnode()].getBackwardmatric());
		   counterbranch++;}
	       }
	     Le_H[d][i] = log(Le_H_positive[d][i]/Le_H_negative[d][i]);
	   }
	 }
       }
    
     for (i = 0; i < n; i++) //assign the Horizontal softvalues to Lu
       for (j = 0; j < n; j++)
	 Lu[i][j] = Le_H[i][j];
     
 //##### Below is the computation of Forwardmatric and Backwardmatric for Vertical######
     
    for (i = 0; i < n; i++){
       for (j = 0; j < n; j++){
	 Lxy[j][i] = Lc*Y_H_V[i][j] + Lu[i][j];
       }
    }
    for (i = 0; i < n; i++)
      for (d = 0; d < n; d++){
	for (i = 1; i < n + 1 ; i++){  //start to calaulate alpha, i is each time point
	  for ( j = 1; j <= ( int)pow(2, statecomplexfile[i]); j++)
	    {
	     counterbranch = startbranchindex[i-1];
	     nodenum = startnodeindex[i] - 1 + j;
	     temp1 = 0.0; temp2 = 0.0; t = 0.0; counter = 0; 
	     while ( counterbranch < startbranchindex[i])
	       {
		 if (branch[counterbranch].getDestinationnode() == nodenum)
		   {
		     counter++; 
		     if (counter == 1){ 
		       temp1 = log(node[branch[counterbranch].getOriginalnode()].getForwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][i-1];
		       temp2 = exp(temp1);}
		     else if (counter == 2)
		       { 
			 temp1 = log(node[branch[counterbranch].getOriginalnode()].getForwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][i-1];
			 temp2 = temp2 + exp(log(node[branch[counterbranch].getOriginalnode()].getForwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][i-1]);
		       }
		     counterbranch++;
		   }
		 else 
		   counterbranch++;
	       }      
	     node[nodenum].setForwardmatric(temp2);
	   }
	}
	//============ below is the case for the last node: time(i) = n ===============
	
       temp1 = log(node[branch[counterbranch].getOriginalnode()].getForwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][n-1];
       temp2 = log(node[branch[counterbranch + 1].getOriginalnode()].getForwardmatric()) + 0.5*branch[counterbranch + 1].getBit()*Lxy[d][n-1];
       temp2 = exp(temp1) + exp(temp2);
       node[nodenum].setForwardmatric(temp2);
      
       // ========================== start the computation of Beta ====================	 
       
       node [nodenumber].setBackwardmatric(1);
       temp1 = 0.0; temp2 = 0.0; t = 0.0; counter = 0;
       i = n-1;  //start to calaulate beta for backward, i is each time point
       for ( j = 0; j < ( int)pow(2, statecomplexfile[i]); j++)
	 {
	   counterbranch = startbranchindex[i];// there are 2 branches going to the last node
	   nodenum = startnodeindex[i] + j;
	   temp1= log(node[branch[counterbranch+j].getDestinationnode()].getBackwardmatric()) + 0.5* branch[counterbranch+j].getBit()*Lxy[d][n-1];
	   temp2 = exp(temp1);
	       node[nodenum].setBackwardmatric(temp2);
	 }
       for (i = n - 2; i > -1; i--)
	 {
	   for (j = 0; j < (int)pow(2, statecomplexfile[i]); j++)
	     {
	       counterbranch = startbranchindex[i];
	       nodenum = startnodeindex[i] + j;
	       counter = 0;
	       while ( counterbranch < startbranchindex[i+1])
		 {
		   if (branch[counterbranch].getOriginalnode() == nodenum)
		     {
		       counter++; 
		       if (counter == 1){
			 temp1 = log(node[branch[counterbranch].getDestinationnode()].getBackwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][i];
			 temp2 = exp(temp1);
		       }
		       else if (counter == 2)
			 {
			   temp1 = log(node[branch[counterbranch].getDestinationnode()].getBackwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][i];
			   temp2 = temp2 + exp(log(node[branch[counterbranch].getDestinationnode()].getBackwardmatric()) + 0.5*branch[counterbranch].getBit()*Lxy[d][i]);
			 }
		       counterbranch++;
		     }
		   else
		     counterbranch++;
		 }
	       node[nodenum].setBackwardmatric(temp2);
	      
	     }
	 }
   
//++++++ Below is the computation for the Extrinsic value with forward tracing value and backward tracing value +++++++
      
       double Le_V_positive[65][65], Le_V_negative[65][65]; 
       for (i =0; i < n; i++)
	 for ( j = 0; j < n; j++)
	   Le_V_positive[i][j] = Le_V_negative[i][j] = 0;

       for (i =0; i < n; i++){
	 if (statecomplexfile[i+1] >= statecomplexfile[i]){
	   counterbranch = startbranchindex[i];
	   while ( counterbranch < startbranchindex[i+1])
	     {
	       if (branch[counterbranch].getBit() == 1){
		 Le_V_positive[d][i] =Le_V_positive[d][i] + ( node[branch[counterbranch].getOriginalnode()].getForwardmatric())* (node[branch[counterbranch].getDestinationnode()].getBackwardmatric());
		 counterbranch++;}
	       else {
		 Le_V_negative[d][i] =Le_V_negative[d][i] + ( node[branch[counterbranch].getOriginalnode()].getForwardmatric())* (node[branch[counterbranch].getDestinationnode()].getBackwardmatric());
		 counterbranch++;}
	     }
	   Le_V[i][d] = log(Le_V_positive[d][i]/Le_V_negative[d][i]);
	 }
       }
     }

       iter++;}

     for (i = 0; i < n; i++)
       for (j = 0; j < n; j++)
	 LL_U[i][j] = Le_H[i][j] + Le_V[i][j] + Lc*Y_H_V[i][j];
	 
//++++++++++++++++++++ Below is the make a decision for the decoder +++++++++++++++++++++++
     
     int counter_i = 0, counter_j = 0;
     for ( i = 0; i < n; i++){ 
       if  ( statecomplexfile[i+1] >= statecomplexfile[i])
	 {   
	   counter_j = 0;
	   for (j = 0; j < n; j++)
	     {
	       
	       if (statecomplexfile[j+1] >= statecomplexfile[j])
		 {
		   if ( LL_U[i][j] > 0)
		     U_estimate[i - counter_i][j - counter_j] = 1;
		   else
		     U_estimate[i - counter_i][j - counter_j] = 0;
		 }
	       else 
		 counter_j++;
	     }
	 }
       else
	 counter_i++;
     }
     
 // +++++++++++++++++++++++++++  computation for the error bit rate  +++++++++++++++++++++++++++++++
     
     for ( i = 0; i < k; i++){
       for (j = 0; j < k; j++)
	 if ( U[i][j] != U_estimate[i][j])
	   error++;
     }
    
     times++;
   }
      
  
   
 Pe = (double)error/(k*k*times);
 tout << "Number of Iterations = " << iter <<endl;
 tout << "Number of Bits in Error = " << error << endl;
 tout << "Number of Transmitted Bits = " << times*k*k << endl;
 tout << "Bit Error Rate (BER) = " << Pe << endl << endl; 
 }


 tout.close();
 return 0;
}

double findstate(int *index,int length, int Gx[][65],int RM_N, int RM_K)
{
  int i;
  int* Temp = 0;
  Temp = new int[length];
  double result = 0.0;
  if(index[0] == -2)
    {
      for(i=0; i < length; i++)
	Temp[i] = 0;
    }
  else if (index[0] >= 0)
  {
    for(i=0; i < length; i++) 
      Temp[i] = Gx[index[0]][i];
  }
  
  for(i=0; i < RM_K; i++)
    {
      if(index[i+1] == -1)
	break;
      else if(index[i+1] >= 0)
	{
	  newAddXYtoX(Temp,Gx[index[i+1]],length,RM_N);
	}
    }
  
  for(i = length - 1; i >= 0; i--)
      {
	if (Temp[i] == 1){
	  result += pow(2, length - 1 - i);
	}
      }
  delete[] Temp;
  return result;
}

void newAddXYtoX(int *X,int *Y,int leng, int RM_N)
{
  int i; 
  
  int temp[65];
  for(i=0; i < 65; i++)
    temp[i] = 0;
  for(i=0; i < leng; i++){
    temp[i] = X[i];
  }
  for(i = RM_N-leng; i < RM_N; i++)
    {
      X[i-(RM_N-leng)] = temp[i-(RM_N-leng)]^Y[i];
    }
}

void fillid(int *in,int *out,int s,int a, int RM_N)
{
  int i;
  int num = 0;
  for(i=0; i < RM_N; i++)
    {
      if(in[i] == -1)
	break;
      else
	{
	  out[num] = in[i];
	  num++;
	}
    }
  if(a == 1)
    out[num] = s;
}

int findbit(int originaltime,double original,int *index, int Gx[][65], int RM_N, int RM_K)
{
  int i; 
  int arraytemp[65];
  double temp;
  int Temp[65];
  
  temp = original;
  for(i=RM_N-originaltime-1; i >= 0; i--)
    {
      arraytemp[i] = (int)fmod(temp, 2);
      temp = temp / 2;
    }
  if(index[1] == -1)
    {
      return arraytemp[0] * 2 - 1;
    }
  else
    {
      if(index[0] == -2)
	{
	  for(i=0; i < RM_N-originaltime+1; i++)
	    Temp[i] = 0;
	}
      else if(index[0] >= 0)
	{
	  for(i=0; i < RM_N-originaltime+1; i++)
	    Temp[i] = Gx[index[0]][i];
	}
      
      for(i=0; i < RM_K; i++)
	{
	  if(index[i+1] == -1 )
	    break;
	  else if(index[i+1] >= 0)
	    {
	      newAddXYtoX(Temp,Gx[index[i+1]],RM_N-originaltime,RM_N);
	    }
	}
      return Temp[0]*2-1;
    } 
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆文化传媒在线观看| 欧美色中文字幕| 国产三级精品三级| 成人动漫在线一区| 亚洲成av人影院| 欧美日韩视频第一区| 亚洲综合偷拍欧美一区色| 欧美日韩在线不卡| 国产一区 二区 三区一级| 国产欧美日韩精品一区| 色香蕉久久蜜桃| 免费日韩伦理电影| 久久久久久久久久久黄色| 91欧美一区二区| 精彩视频一区二区| 亚洲欧洲www| 欧美亚洲日本一区| 国产精品99久久久久久有的能看 | 欧美日韩亚洲丝袜制服| 日韩一区二区三区免费观看| 老司机精品视频导航| 亚洲h精品动漫在线观看| 欧美日韩一区二区三区不卡| 亚洲码国产岛国毛片在线| 欧美国产成人在线| 欧美国产日韩a欧美在线观看 | 日韩女优制服丝袜电影| 91久久久免费一区二区| 国内精品伊人久久久久av一坑| 亚洲日本va午夜在线电影| 日韩免费一区二区三区在线播放| 大尺度一区二区| 国内外成人在线| 男女性色大片免费观看一区二区 | 亚洲国产日韩一区二区| 中文字幕巨乱亚洲| 日韩一区二区三区视频在线观看| 粉嫩aⅴ一区二区三区四区五区| 青青草国产精品亚洲专区无| 亚洲日本成人在线观看| 久久精品视频在线看| 欧美国产成人精品| 国产精品日韩精品欧美在线| 国产视频在线观看一区二区三区| 欧美日韩综合在线免费观看| 色综合久久88色综合天天| 91在线视频免费观看| 国产91高潮流白浆在线麻豆| 国产在线精品免费av| 免费观看在线综合色| 黄色成人免费在线| 国产风韵犹存在线视精品| 久久精品久久久精品美女| 美女一区二区视频| 老司机免费视频一区二区三区| 日韩高清国产一区在线| 天堂va蜜桃一区二区三区 | 日韩欧美高清一区| 国产精品三级av| 日本亚洲电影天堂| 一本大道久久a久久综合| 欧美一区二区成人| 亚洲六月丁香色婷婷综合久久| 日韩成人一级大片| 国产一区在线观看麻豆| 91在线porny国产在线看| 67194成人在线观看| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲欧美日韩国产成人精品影院| 性欧美大战久久久久久久久| 国产一区不卡在线| 欧美日韩精品免费| 国产精品免费视频网站| 免费人成精品欧美精品| www.日韩大片| 亚洲精品在线三区| 亚洲成av人影院在线观看网| 成人av网站大全| 久久在线观看免费| 日本在线不卡一区| 欧美三区在线视频| 亚洲精品免费电影| 成人伦理片在线| 精品国产免费人成电影在线观看四季| 亚洲人成在线播放网站岛国| 国产一区二区中文字幕| 欧美一区日本一区韩国一区| 一区二区久久久久久| 99九九99九九九视频精品| 欧美tickling挠脚心丨vk| 亚洲1区2区3区视频| 在线视频一区二区三| 一区二区三区日韩欧美精品| 99久久精品费精品国产一区二区| 26uuu国产日韩综合| 国产精品亚洲人在线观看| 久久久久久9999| 成人少妇影院yyyy| 国产精品不卡视频| 色偷偷88欧美精品久久久 | 欧美三级在线视频| 亚洲国产精品影院| 日韩毛片视频在线看| 欧美日韩一卡二卡| 免费高清成人在线| 国产人妖乱国产精品人妖| 成人av网站免费观看| 午夜影视日本亚洲欧洲精品| 日韩一区二区视频在线观看| 蜜臀av亚洲一区中文字幕| 精品国产一区二区三区忘忧草| 国产91在线观看丝袜| 亚洲精品国产成人久久av盗摄 | 亚洲国产wwwccc36天堂| 日韩精品一区二区三区视频| 国产成人一区在线| 亚洲一区精品在线| 国产无人区一区二区三区| 在线观看日韩精品| 国产精品亚洲专一区二区三区| 亚洲欧美日韩在线| 精品99一区二区三区| 欧美色成人综合| 99久久伊人久久99| 国产盗摄一区二区| 日本一区中文字幕| 一区二区三区免费在线观看| 国产午夜精品久久久久久久 | 欧美激情资源网| 欧美变态tickling挠脚心| 在线观看不卡视频| 94-欧美-setu| 懂色av一区二区在线播放| 肉丝袜脚交视频一区二区| 一区二区三区四区中文字幕| 久久久www成人免费无遮挡大片 | 欧美喷潮久久久xxxxx| 色综合网色综合| 99久久精品99国产精品| 成人一道本在线| 国产成人免费av在线| 国产精品一区二区不卡| 琪琪久久久久日韩精品| 日韩vs国产vs欧美| 热久久久久久久| 久久精品99国产精品日本| 麻豆精品新av中文字幕| 日韩和欧美一区二区三区| 石原莉奈一区二区三区在线观看 | 国产精品网站在线观看| 日产国产高清一区二区三区 | 一区二区三区在线免费播放| 亚洲午夜日本在线观看| 日韩和欧美一区二区三区| 久草热8精品视频在线观看| 国内精品免费在线观看| 国产精品自在在线| 99热99精品| 777亚洲妇女| 久久精品亚洲乱码伦伦中文| 欧美国产精品一区| 亚洲电影一级片| 国产成+人+日韩+欧美+亚洲| 91免费精品国自产拍在线不卡| 欧美丰满一区二区免费视频| 久久久国产午夜精品| 一区二区三区日本| 韩国一区二区在线观看| 91免费版pro下载短视频| 精品欧美黑人一区二区三区| 国产精品蜜臀av| 狠狠色综合日日| 日本精品裸体写真集在线观看| 精品日本一线二线三线不卡| 亚洲欧美中日韩| 国产xxx精品视频大全| 日韩女同互慰一区二区| 一级精品视频在线观看宜春院| 国产一区二区不卡在线| 7777精品伊人久久久大香线蕉超级流畅| 久久久午夜精品理论片中文字幕| 亚洲电影视频在线| 欧美综合一区二区三区| 亚洲欧美一区二区在线观看| 国产成人在线网站| 2020国产精品| 国产一区二区h| 久久久久久久综合狠狠综合| 久久精品国产网站| 精品国产伦一区二区三区观看体验| 日韩精彩视频在线观看| 日韩一区二区三区在线观看| 日韩福利视频网| 日韩欧美亚洲国产精品字幕久久久| 亚洲电影中文字幕在线观看| 91久久香蕉国产日韩欧美9色| 亚洲国产精品久久一线不卡| 欧美伊人精品成人久久综合97| 亚洲精品国久久99热| 欧美日韩在线直播|