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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ribm.cpp

?? RS碼解碼的C語言仿真程序,RiBM算法
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
      omiga ^= alpha_to[(z[j]+i*j)%nn];
    }

    sita = 0;
    for(j=0; j<=tt; j++){
     if((j%2)!=0 && reg[j]!=-1)
      sita ^= alpha_to[(reg[j]+i*j)%nn];
    }
   }
   file://End of reference*/


//   file://calculate the error value and correct
   for (i=0; i<nn; i++){
    err[i] = 0 ;
       if (recd[i]!=-1)        // convert recd[] to polynomial form
           recd[i] = alpha_to[recd[i]] ;
    else
     recd[i] = 0 ;
   }

   for (i=0; i<count; i++)
   {
    omiga = 0;
    for(j=0; j<tt; j++){
     if(z[j]!=-1 && root[i]!=-1)
      omiga ^= alpha_to[(z[j]+root[i]*j)%nn];
    }

    sita = 0;
    for(j=0; j<=tt; j++){
     if((j%2)!=0 && reg[j]!=-1 && root[i]!=-1)
      sita ^= alpha_to[(reg[j]+root[i]*j)%nn];
    }

//    file://sita = alpha_to[nn-index_of[sita]];
  //  file://yi = alpha_to[root[i]*(no_p+1)%nn];

    /*yi = (root[i]*(no_p-1))%nn;
    if(omiga!=0)
     yi = (yi + index_of[omiga])%nn;
    if(sita!=0)
     yi = (yi + nn - index_of[sita])%nn;*/
    yi = (root[i]*(no_p+1) + index_of[omiga] + nn - index_of[sita])%nn;
    err[loc[i]] = alpha_to[yi];

    recd[loc[i]] ^= err[loc[i]];
   }

   /*yi = alpha_to[nn-index_of[109]];
   yi = alpha_to[nn-index_of[176]];
   yi = alpha_to[nn-index_of[254]];*/

   yi = alpha_to[(index_of[12]+index_of[5])%nn];
   yi = alpha_to[(index_of[125]+index_of[156])%nn];
   yi = alpha_to[(index_of[184]+index_of[240])%nn];

   yi = alpha_to[(index_of[60]+index_of[236])%nn];
   yi = alpha_to[(index_of[201]+index_of[135])%nn];
   yi = alpha_to[(index_of[178]+index_of[126])%nn];

   for(i=0; i<nn; i++)
    recd[i] = index_of[recd[i]];

   syn_error = 0;
//   file://End

   if (syn_error)       /* if errors, try and correct */
    {
/* compute the error location polynomial via the Berlekamp iterative algorithm,
   following the terminology of Lin and Costello :   d[u] is the 'mu'th
   discrepancy, where u='mu'+1 and 'mu' (the Greek letter!) is the step number
   ranging from -1 to 2*tt (see L&C),  l[u] is the
   degree of the elp at that step, and u_l[u] is the difference between the
   step number and the degree of the elp.
*/
/* initialise table entries */
      d[0] = 0 ;           /* index form */
      d[1] = s[1] ;        /* index form */
      elp[0][0] = 0 ;      /* index form */
      elp[1][0] = 1 ;      /* polynomial form */
      for (i=1; i<nn-kk; i++)
        { elp[0][i] = -1 ;   /* index form */
          elp[1][i] = 0 ;   /* polynomial form */
        }
      l[0] = 0 ;
      l[1] = 0 ;
      u_lu[0] = -1 ;
      u_lu[1] = 0 ;
      u = 0 ;

      do
      {
        u++ ;
        if (d[u]==-1)
          { l[u+1] = l[u] ;
            for (i=0; i<=l[u]; i++)
             {  elp[u+1][i] = elp[u][i] ;
                elp[u][i] = index_of[elp[u][i]] ;
             }
          }
        else
/* search for words with greatest u_lu[q] for which d[q]!=0 */
          { q = u-1 ;
            while ((d[q]==-1) && (q>0)) q-- ;
/* have found first non-zero d[q]  */
            if (q>0)
             { j=q ;
               do
               { j-- ;
                 if ((d[j]!=-1) && (u_lu[q]<u_lu[j]))
                   q = j ;
               }while (j>0) ;
             } ;

/* have now found q such that d[u]!=0 and u_lu[q] is maximum */
/* store degree of new elp polynomial */
            if (l[u]>l[q]+u-q)  l[u+1] = l[u] ;
            else  l[u+1] = l[q]+u-q ;

/* form new elp(x) */
            for (i=0; i<nn-kk; i++)    elp[u+1][i] = 0 ;
            for (i=0; i<=l[q]; i++)
              if (elp[q][i]!=-1)
                elp[u+1][i+u-q] = alpha_to[(d[u]+nn-d[q]+elp[q][i])%nn] ;
            for (i=0; i<=l[u]; i++)
              { elp[u+1][i] ^= elp[u][i] ;
                elp[u][i] = index_of[elp[u][i]] ;  /*convert old elp value to index*/
              }
          }
        u_lu[u+1] = u-l[u+1] ;

/* form (u+1)th discrepancy */
        if (u<nn-kk)    /* no discrepancy computed on last iteration */
          {
            if (s[u+1]!=-1)
                   d[u+1] = alpha_to[s[u+1]] ;
            else
              d[u+1] = 0 ;
            for (i=1; i<=l[u+1]; i++)
              if ((s[u+1-i]!=-1) && (elp[u+1][i]!=0))
                d[u+1] ^= alpha_to[(s[u+1-i]+index_of[elp[u+1][i]])%nn] ;
            d[u+1] = index_of[d[u+1]] ;    /* put d[u+1] into index form */
          }
      } while ((u<nn-kk) && (l[u+1]<=tt)) ;

      u++ ;
      if (l[u]<=tt)         /* can correct error */
       {
/* put elp into index form */
         for (i=0; i<=l[u]; i++)   elp[u][i] = index_of[elp[u][i]] ;

/* find roots of the error location polynomial */
         for (i=1; i<=l[u]; i++)
           reg[i] = elp[u][i] ;
         count = 0 ;
         for (i=1; i<=nn; i++)
          {  q = 1 ;
             for (j=1; j<=l[u]; j++)
              if (reg[j]!=-1)
                { reg[j] = (reg[j]+j)%nn ;
                  q ^= alpha_to[reg[j]] ;
                } ;
             if (!q)        /* store root and error location number indices */
              { root[count] = i;
                loc[count] = nn-i ;
                count++ ;
              };
          } ;
         if (count==l[u])    /* no. roots = degree of elp hence <= tt errors */
          {
/* form polynomial z(x) */
           for (i=1; i<=l[u]; i++)        /* Z[0] = 1 always - do not need */
            { if ((s[i]!=-1) && (elp[u][i]!=-1))
                 z[i] = alpha_to[s[i]] ^ alpha_to[elp[u][i]] ;
              else if ((s[i]!=-1) && (elp[u][i]==-1))
                      z[i] = alpha_to[s[i]] ;
                   else if ((s[i]==-1) && (elp[u][i]!=-1))
                          z[i] = alpha_to[elp[u][i]] ;
                        else
                          z[i] = 0 ;
              for (j=1; j<i; j++)
                if ((s[j]!=-1) && (elp[u][i-j]!=-1))
                   z[i] ^= alpha_to[(elp[u][i-j] + s[j])%nn] ;
              z[i] = index_of[z[i]] ;         /* put into index form */
            } ;

  /* evaluate errors at locations given by error location numbers loc[i] */
           for (i=0; i<nn; i++)
             { err[i] = 0 ;
               if (recd[i]!=-1)        /* convert recd[] to polynomial form */
                 recd[i] = alpha_to[recd[i]] ;
               else  recd[i] = 0 ;
             }
           for (i=0; i<l[u]; i++)    /* compute numerator of error term first */
            { err[loc[i]] = 1;       /* accounts for z[0] */
              for (j=1; j<=l[u]; j++)
                if (z[j]!=-1)
                  err[loc[i]] ^= alpha_to[(z[j]+j*root[i])%nn] ;
              if (err[loc[i]]!=0)
               { err[loc[i]] = index_of[err[loc[i]]] ;
                 q = 0 ;     /* form denominator of error term */
                 for (j=0; j<l[u]; j++)
                   if (j!=i)
                     q += index_of[1^alpha_to[(loc[j]+root[i])%nn]] ;
                 q = q % nn ;
                 err[loc[i]] = alpha_to[(err[loc[i]]-q+nn)%nn] ;
                 recd[loc[i]] ^= err[loc[i]] ;  /*recd[i] must be in polynomial form */
               }
            }
          }
         else    /* no. roots != degree of elp => >tt errors and cannot solve */
           for (i=0; i<nn; i++)        /* could return error flag if desired */
               if (recd[i]!=-1)        /* convert recd[] to polynomial form */
                 recd[i] = alpha_to[recd[i]] ;
               else  recd[i] = 0 ;     /* just output received codeword as is */
       }
     else         /* elp has degree has degree >tt hence cannot solve */
       for (i=0; i<nn; i++)       /* could return error flag if desired */
          if (recd[i]!=-1)        /* convert recd[] to polynomial form */
            recd[i] = alpha_to[recd[i]] ;
          else  recd[i] = 0 ;     /* just output received codeword as is */
    }
   else       /* no non-zero syndromes => no errors: output received codeword */
    for (i=0; i<nn; i++)
       if (recd[i]!=-1)        /* convert recd[] to polynomial form */
         recd[i] = alpha_to[recd[i]] ;
       else  recd[i] = 0 ;
 }

 

void main()
{
  register int i, k;
  struct _timeb t1, t2;
  int err_dec;

  generate_gf();
  gen_poly() ;

//file://for  (i=0; i<kk; i++)   data[i] = rand()%256 ;
  for(i=0; i<kk; i++){
   data[i] = kk+2-i;
   if(data[i]>=256)
    data[i] = data[i] - 256;
  }

_ftime(&t1);
for (i = 0; i < 10000; i ++)
  encode_rs() ;
_ftime(&t2);

i = (t2.millitm-t1.millitm)+(t2.time-t1.time)*1000;

  for (i=0; i<nn-kk; i++)  recd[i] = bb[i] ;
  for (i=0; i<kk; i++) recd[i+nn-kk] = data[i] ;

/*for (k = 0; k < tt; k ++)
 recd[rand()%nn] = rand()%256;*/

/*for(k=0; k<nn; k++)
 recd[k] = 255-k+2;

recd[1] = 0;
recd[0] = 1;*/

recd[252] = 11;
recd[228] = 56;
recd[212] = 232;
//file://recd[193] = 197;
//file://recd[161] = 25;
//file://recd[92] = 133;

_ftime(&t1);
//file://for (i = 0; i < 10000; i ++)
for (i = 0; i < 1; i ++)
{
  for (k=0; k<nn; k++)
     recd[k] = index_of[recd[k]] ;          /* put recd[i] into index form */
  decode_rs() ;         /* recd[] is returned in polynomial form */
}
_ftime(&t2);

i = (t2.millitm-t1.millitm)+(t2.time-t1.time)*1000;

err_dec = 1;
for (i = 0; i <kk; i++){
 if (recd[i+nn-kk] != data[i]){
  err_dec = 0;
   break;
 }
}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产在线国偷精品产拍免费yy| 精品一区二区三区视频 | 欧美人伦禁忌dvd放荡欲情| 麻豆91精品91久久久的内涵| 亚洲欧洲无码一区二区三区| 日韩一卡二卡三卡| 91福利视频网站| 成人性视频免费网站| 三级久久三级久久| 亚洲一区二区欧美激情| 中文字幕日韩一区二区| 国产亚洲一本大道中文在线| 7777精品伊人久久久大香线蕉经典版下载 | 中文在线一区二区| 精品99999| 日韩三级视频中文字幕| 欧美三级电影网| 99re免费视频精品全部| 成人一区二区视频| 国产福利一区二区三区视频在线| 蜜臀av一区二区在线观看| 亚洲一区二区三区自拍| 国产乱码精品一区二区三区忘忧草| 午夜精品免费在线观看| 亚洲精品视频在线观看免费| 国产清纯在线一区二区www| 精品国产区一区| 欧美精品一区二区三区久久久 | 欧美电影免费观看高清完整版在| 欧美日韩大陆一区二区| 欧美三电影在线| 色94色欧美sute亚洲线路一久 | 亚洲国产精品久久一线不卡| 悠悠色在线精品| 亚洲免费在线电影| 亚洲人成网站色在线观看| 国产精品久99| 亚洲欧美日韩一区| 亚洲精品精品亚洲| 亚洲精品国产高清久久伦理二区| 亚洲三级在线免费观看| 亚洲一区av在线| 天天综合网 天天综合色| 日韩精品福利网| 麻豆免费精品视频| 国产美女精品在线| av高清久久久| 欧美在线你懂的| 欧美电影在线免费观看| 日韩免费一区二区三区在线播放| 日韩午夜激情av| 久久久蜜臀国产一区二区| 亚洲国产精品av| 亚洲精品一二三四区| 亚洲一区二区av在线| 免费在线成人网| 国产成人av在线影院| 91麻豆高清视频| 欧美日本免费一区二区三区| 日韩欧美成人一区| 中文欧美字幕免费| 亚洲一区二区三区激情| 麻豆精品视频在线| 成人动漫视频在线| 欧美日韩在线免费视频| 日韩欧美一区二区三区在线| 日本一区二区三区四区| 亚洲成人tv网| 国产精品白丝jk黑袜喷水| 色诱视频网站一区| 91精品国产免费久久综合| 久久久99久久| av电影天堂一区二区在线观看| 91久久精品一区二区二区| 日韩午夜在线影院| 成人欧美一区二区三区1314| 午夜精品123| 成人妖精视频yjsp地址| 欧美日韩一区二区电影| 国产亚洲自拍一区| 亚洲一级片在线观看| 国产毛片精品视频| 欧美三级中文字| 日本一区二区免费在线观看视频| 亚洲夂夂婷婷色拍ww47| 国产一本一道久久香蕉| 欧美日韩精品一区二区| 国产精品久久久久一区二区三区共| 午夜国产不卡在线观看视频| 成人黄色777网| 日韩三级视频在线观看| 亚洲少妇30p| 国产九色精品成人porny| 欧美日韩国产一二三| 中文字幕不卡在线| 热久久国产精品| 在线免费观看不卡av| 国产片一区二区| 老汉av免费一区二区三区| 一本一道波多野结衣一区二区| 精品成人免费观看| 全部av―极品视觉盛宴亚洲| 色狠狠色狠狠综合| 欧美国产综合一区二区| 另类小说综合欧美亚洲| 欧美日韩综合不卡| 亚洲人123区| 国产白丝精品91爽爽久久 | 欧美一区二区日韩| 亚洲成在人线在线播放| 91麻豆自制传媒国产之光| 国产婷婷色一区二区三区在线| 免费观看久久久4p| 欧美男人的天堂一二区| 曰韩精品一区二区| 99re亚洲国产精品| 国产精品第一页第二页第三页| 精品亚洲成a人| 欧美mv日韩mv国产网站| 肉丝袜脚交视频一区二区| 欧美日韩精品一区二区在线播放| 亚洲男人都懂的| 色综合天天综合网国产成人综合天| 国产肉丝袜一区二区| 国产精品一区在线观看乱码| 精品少妇一区二区三区日产乱码| 丝袜美腿成人在线| 7777女厕盗摄久久久| 石原莉奈在线亚洲三区| 欧美电影在哪看比较好| 日韩精品电影在线| 日韩欧美中文字幕一区| 日本午夜一本久久久综合| 在线成人免费视频| 日本女人一区二区三区| 日韩欧美一卡二卡| 国产一区二区不卡在线| 国产午夜久久久久| 岛国一区二区在线观看| 国产精品电影院| 日本丶国产丶欧美色综合| 色88888久久久久久影院按摩 | 亚洲国产成人av网| 欧美亚洲日本国产| 五月天欧美精品| 91精品久久久久久蜜臀| 久久疯狂做爰流白浆xx| 久久一区二区三区四区| 国产91精品免费| 亚洲欧洲av一区二区三区久久| 色综合网色综合| 天涯成人国产亚洲精品一区av| 日韩一区二区三区电影在线观看| 国内外精品视频| 国产精品国产成人国产三级 | 久久精品视频一区二区| 97久久超碰精品国产| 亚洲成人免费看| 精品日韩av一区二区| 福利一区在线观看| 亚洲综合色婷婷| 欧美成人午夜电影| 99久久伊人网影院| 五月激情丁香一区二区三区| 久久亚洲综合av| 91在线播放网址| 青青草97国产精品免费观看无弹窗版 | 一区二区三区在线高清| 欧美一区二区三区精品| 岛国一区二区三区| 亚洲国产一二三| 久久久精品免费观看| 一本到不卡免费一区二区| 麻豆成人久久精品二区三区小说| 欧美韩国日本不卡| 欧美老肥妇做.爰bbww| 国产成人综合网站| 亚洲丶国产丶欧美一区二区三区| 久久久久久亚洲综合影院红桃 | 国产日韩视频一区二区三区| 色综合 综合色| 国产一级精品在线| 亚洲一区二区三区爽爽爽爽爽| 精品日韩一区二区三区| 91美女在线看| 国产麻豆视频一区二区| 性做久久久久久久免费看| 日本一区二区三区在线观看| 91精品国产欧美日韩| 92精品国产成人观看免费| 久色婷婷小香蕉久久| 夜夜嗨av一区二区三区中文字幕| 精品国产区一区| 欧美电影一区二区| 色婷婷激情一区二区三区| 国产黄人亚洲片| 奇米精品一区二区三区在线观看一| 亚洲欧洲日韩综合一区二区| xfplay精品久久| 欧美一区二区三区小说|