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

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

?? gallager.c

?? 快速傅立葉變換程序代碼,學信號的同學,可要注意了
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*   gallager - software to simulate decoding of low-density parity-check codes     Copyright   (c) 2002   David J.C. MacKay     This program is free software; you can redistribute it and/or modify    it under the terms of the GNU General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU General Public License for more details.    You should have received a copy of the GNU General Public License    along with this program; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    GNU licenses are here :    http://www.gnu.org/licenses/licenses.html    Author contact details are here :    http://www.inference.phy.cam.ac.uk/mackay/    If you find this software useful, please feel free to make a donation to    support David MacKay's research group.*//*   gallager.c   mncN.c   mnc6.c                                    (c) DJCM 94 07 04                                                      94 10 26						      94 10 31						      95 01 02						      95 02 23 (from mnc2 to mnc3)						      95 04 01 continued work on mnc3						      95 05 01 to mnc4						      95 05 27 to mnc5						      95 08 31 to mnc6						      95 11 04 to mnc7						      95 11 16 to mncN						      97 07 23 added noise-writing                                                      98 10 12 to gallager						      98 11 19 added bsc option again   - This simulator can decode LDPC codes and other closely related codes,     for example MN codes, and LDPC codes with some bits punctured.     It does binary codes only.     It can simulate Gaussian channels and binary symmetric channels,     and BSCs with two different known noise levels.						         - gallager writes files rationally like RA.c      added features: spotting of low weight errors      and logging of det/undet and histograms.      So that the output file becomes unnecessary.   - mncN = quick hack to do all bits as if they are noise bits.   - free energy minimization for the MacKay-Neal Error Correcting Code -    - or belief net decoder                                              -   - mnc7 includes option of gaussian channel                           -   - space is made for the fe min or for the bnd, then the scoring      routine gets to look at the results via pointers in the mnc_vector     structure. Thus scoring is divorced from fe.      crucial var files: both fe_var6 and dc_var6   ======================================================================   This code is (c) David J.C. MacKay 1994, 1995. It is free software    as defined by the free software foundation.    What this program does:      reads in a matrix A in alist format.     do {       generates a  random vector x,        shoves it through A, adds y if appropriate, -> z = Ax + y       do {         gives b, g (z) to the minimization machine, or A,z to the bnd         checks the answer. 	 next strategy       }       until ( success OR no more strategies )     }     while ( not many failures )*/#include "./ansi/r.h"#include "./ansi/rand2.h"#include "./ansi/mynr.h"#include "./ansi/cmatrix.h"#include "./ansi/macopt.h"#include "./thing_sort.h"#include "./fe6.h"#include "./bnd.h"#include "./GAd.h" /* added purely for structure compatibility *//* this must come last: */#include "./mnc6.h"/* static void totalline ( FILE * , mnc_all * , data_creation_param * ); */static void dc_defaults ( data_creation_param * ) ; static int    process_command ( int , char **  , mnc_all * ) ; static void   print_usage ( char ** , FILE * ,  mnc_all *  );static void   fe_print_usage ( char ** , FILE * ,  mnc_all *  );static int make_sense ( data_creation_param * , mnc_all * ) ; static int make_sense_c ( data_creation_param * , fe_min_control * ) ; static int make_space ( mnc_all * , mnc_vectors * ) ;static int make_norder ( alist_matrix * , fe_min_control * ) ;static int make_vectors_quick ( data_creation_param * , mnc_vectors * ,  mnc_all * ) ;static int make_vectors_quickER ( data_creation_param * , mnc_vectors * ,  mnc_all * ) ;static void process_vector_fe ( mnc_vectors *v , fe_min_param *p ) ;static int make_fgaussian_noise_bits_and_fix_biases ( unsigned char * ,						    double *,double *,						    double  , double , 						    double  , int , int  ) ;static int make_gaussian_noise_bits_and_fix_biases ( unsigned char * ,						    double *,						    double  ,						    int , int  ) ;static int make_gaussian_noise_bits_ONLY ( unsigned char * ,						    double *,						    double  ,						    int , int  ) ;static void set_up_biases ( double * , mnc_vectors * , data_creation_param * ) ; static void set_up_priors ( double * , mnc_vectors * , data_creation_param * ) ; static int score ( data_creation_param * , mnc_vectors  * , mnc_all * ) ; static int evaluate_feasibility ( data_creation_param * ) ;static double bern ( int  , int  , double * , double * ,  double * , double );static void write_histo ( FILE * , mnc_all * ) ;static void snappyline ( data_creation_param * ) ;static void   finalline (  FILE * , mnc_all * , data_creation_param * , int ) ;static void mnc_free ( mnc_all * ) ; static int check_alist_MN ( alist_matrix * , mnc_vectors *vec , data_creation_param * ) ; static int hook_mnc_vec_to_bnd ( bnd_param *p , mnc_vectors *vec ) ;static int hook_mnc_vec_to_fe ( fe_min_param *p , mnc_vectors *vec ) ;static void bnd_print_usage ( char **argv , FILE * fp , mnc_all *all );static double h2 ( double ) ;void   main ( int , char ** ) ;/*        MAIN                     */void main ( int argc, char *argv[] ){  FILE   *fp  ;   fe_min_param        p    ;  fe_min_control      c    ;  fe_min_control      c2   ; /* backup strategy */  fe_min_control      c3   ; /* backup strategy */  bnd_control         bndc ;   bnd_param           bndp ;  data_creation_param dc   ;  mnc_vectors         vec  ;   mnc_all             all  ;  all.dc   = &dc ;   all.p    = &p ;   all.c    = &c ;   all.bndp = &bndp ;   all.bndc = &bndc ;   all.c2   = &c2 ;   all.c3   = &c3 ;   all.vec  = &vec ;   all.a    = &(p.a) ;   bndp.a   = &(p.a) ;   fe_defaults_p ( &p ) ;   fe_defaults_c ( &c ) ;   fe_defaults_c ( &c2 ) ;   fe_defaults_c ( &c3 ) ;   dc_defaults   ( &dc ) ;   bnd_defaults  ( &bndp , & bndc ) ;   if ( process_command (argc, argv, &all ) < 0 ) exit (0) ;  if ( make_sense ( &dc , &all ) < 0 ) exit (0) ;  fprintf(stderr,"mncN N0=%d, M0=%d, N=%d, M=%d, x=%6.3g, fn=%6.3g, fs=%6.3g, nn=%d, ns=%d\n",	  dc.N , dc.M , vec.N , vec.M , dc.gcx , dc.fn , dc.fs , dc.nn , dc.ns) ;  fflush(stderr);  if ( dc.use_fe && c.second ) {    fprintf(stdout,"opt=%2d:%2d:%2d ",	     c.opt , c.gamma , c.metric ) ;    fprintf(stdout,"opt2=%2d:%2d:%2d ",	     c2.opt , c2.gamma , c2.metric ) ;    fprintf(stdout,"opt3=%2d:%2d:%2d ",	     c3.opt , c3.gamma , c3.metric ) ;  }  if ( make_space ( &all , &vec ) < 0 ) exit (0) ;  if ( read_allocate_alist ( &(p.a) , dc.afile ) < 0 ) exit (0) ;   if ( check_alist_MN ( &(p.a) , &vec , &dc ) < 0 ) exit (0) ;   if ( dc.use_fe >= 1 ) {    c.mega_needed = ( c.opt == 3 || 		   ( c.second && c2.opt == 3 ) || 		   ( c.third && c3.opt == 3 ) ) ;    hook_mnc_vec_to_fe (  &p ,  &vec ) ;    fe_allocate2 ( &p , c.mega_needed ) ;     set_up_biases ( p.bias , &vec , &dc ) ;     if ( make_norder ( &(p.a) , &c ) < 0 ) exit ( 0 ) ;   }  if ( dc.use_bnd >= 1 ) {    hook_mnc_vec_to_bnd (  &bndp ,  &vec ) ;    bnd_allocate ( &bndp , &bndc ) ;     set_up_priors ( bndp.bias , &vec , &dc ) ;   }  if ( evaluate_feasibility ( &dc ) < 0 ) exit ( 0 ) ;   if ( c.writelog ) {    fp = fopen ( c.logfile , "w" ) ;    if ( !fp ) {      fprintf ( stderr , " couldn't open logfile %s\n" , c.logfile ) ;       c.writelog = 0 ;     } else fclose (fp ) ;   }  if ( bndc.writelog ) {    fp = fopen ( bndc.logfile , "w" ) ;    if ( !fp ) {      fprintf ( stderr , " couldn't open logfile %s\n" , bndc.logfile ) ;       bndc.writelog = 0 ;     } else fclose (fp ) ;   }  if ( dc.error_log ) {    fp = fopen ( dc.error_logfile , "w" ) ;    if ( !fp ) {      fprintf ( stderr , " couldn't open logfile %s\n" , dc.error_logfile ) ;       dc.error_log = 0 ;     } else fclose (fp ) ;   }  if ( dc.noise_sum ) {    fp = fopen ( dc.noise_sumfile , "w" ) ;    if ( !fp ) {      fprintf ( stderr , " couldn't open logfile %s\n" , dc.noise_sumfile ) ;       dc.noise_sum = 0 ;     } else fclose (fp ) ;   }  /*      MAIN LOOP                 */  ran_seed ( dc.vseed ) ;   dc.message = 1 ;  if ( dc.skip ) {    fprintf ( stderr , "skipping %d", dc.skip ) ;     for (  ; dc.message <= dc.skip ; dc.message ++ ) {      make_vectors_quickER ( &dc , &vec , &all ) ;       if ( !(dc.message % 200) ) { fprintf ( stderr , "." ) ; fflush ( stderr ) ; }    }fprintf ( stderr , "\n" ) ;   }  for ( ;       ( dc.message <= dc.MESSAGE ) &&        ( ( dc.failures==0 ) || ( dc.failcount < dc.failures ) ) ;        dc.message ++ ) {    snappyline( &dc ) ;    fflush(stdout) ;     make_vectors_quick ( &dc , &vec , &all ) ; /* see this file */    if ( dc.use_fe >=1 ) {      process_vector_fe ( &vec , &p ) ;       all.controller = 1 ;       if ( ( fe_min ( &p , &c ) > 0 ) && ( c.second ) ) {	all.controller ++ ;	if ( ( fe_min ( &p , &c2 ) > 0 ) && ( c.third ) ) { 	  all.controller ++ ;	  fe_min (  &p , &c3 ) ; 	}      }    } else {      all.controller = 0 ;       bndecode ( &bndp , &bndc ) ;    }    if ( score ( &dc , &vec , &all ) < 0 ) exit ( 0 ) ; /* score also writes error logs and keeps track of nasty noise patterns */    if ( dc.verbose > 0 ) finalline ( stdout , &all , &dc , 0 ) ;    if ( c.printout ) { /* append */      fp = fopen ( c.outfile , ((c.outappend)? "a":"w") ) ;      if( !fp ) {	fprintf( stderr, "No such file: %s\n", c.outfile ) ;	finalline ( stderr , &all , &dc , 0 ) ;      }      else 	{	finalline ( fp , &all , &dc , 0 ) ;	fclose ( fp ) ;      }    }    /* if this is going to be the last loop, or the number of messages is 30,60,... */    if ( ( !( ( dc.message+1 <= dc.MESSAGE ) && 	    ( ( dc.failures==0 ) || ( dc.failcount < dc.failures ) ) ) )  	 || ( !(dc.message % dc.big_write_period ) ) ) {      if ( c.printtot ) { /* write */	fp = fopen ( c.totoutfile , "w" ) ;	if( !fp ) {	  fprintf( stderr, "No such file: %s\n", c.totoutfile ) ;	  finalline ( stderr , &all , &dc ,  1 ) ;	}      else 	{	  finalline ( fp , &all , &dc , 1 ) ;	  fclose ( fp ) ;	}      }      if ( c.printhisto && dc.block_valid ) { /* update histogram file */	fp = fopen ( c.histofile , "w" ) ;	if( !fp ) {	  fprintf( stderr, "No such file: %s\n", c.histofile ) ;	}      else 	{	  write_histo ( fp , &all ) ;	  fclose ( fp ) ;	}      }    }  }  if ( dc.use_fe >= 1 ) {    fe_free2 ( &p , c.mega_needed ) ;   }  if ( dc.use_bnd >= 1 ) {    bnd_free ( &bndp , &bndc ) ;  }  mnc_free ( &all ) ; }static void write_histo ( FILE *fp , mnc_all *c ) {  int l;  double t , cum = 0.0 ;  double  tot = (double) c->dc->block_valid ;   int *histo = c->vec->histo ;   int loops = c->bndc->loops ;  fprintf ( fp , "# total valid blocks %d\n" , (int) tot ) ;   for ( l = 1 ; l <= loops ; l ++ ) {    t= (double) histo[l] ;    cum += t ;    fprintf ( fp , "%d\t%d\t%d\t%9.4g\t%9.4g\n" , l , (int)(t) , (int)(cum) , 	      t/tot , cum/tot ) ;   }}static void snappyline ( data_creation_param  *c ) {  printf ( "%d:%du%dd%dl/%d\t" , c->failcount ,	   c->block_undet, c->block_det,	   c->block_detlw , c->message - 1 ) ; fflush ( stdout ) ; }static double bern ( int errors , int trials , double *p_point , double *p_upper		   ,  double *p_lower , double zscore ) {  double factor ; double lowerbound = 1e-6 ;  if ( errors == 0  ) {    *p_point = lowerbound ;    *p_lower = lowerbound ;    *p_upper = 1.0 - exp( - zscore / (double)(trials) ) ;     factor = 100.0 ;   } else {    *p_point =  (double)(errors)/(double)(trials) ;    /* factor corresponding z sd's in log p */    factor = exp ( zscore * sqrt( (double)(trials - errors ) / ((double)(errors * trials ) ) )) ;    *p_upper = *p_point * factor ;     *p_lower = *p_point / factor ;   }  return factor ;}static void finalline ( FILE *fp , mnc_all *all , data_creation_param *dc , int totals ){  mnc_vectors *v = all->vec ;  fe_min_control *c = all->c ;   double factor ; 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美国产三级电影视频| 久久久电影一区二区三区| 精品在线播放午夜| 久久久99精品久久| 午夜影视日本亚洲欧洲精品| 日韩久久免费av| 91美女福利视频| jiyouzz国产精品久久| 51午夜精品国产| 欧美日韩黄视频| 亚洲欧美激情在线| 丝袜美腿亚洲色图| 精品国内二区三区| 久久九九影视网| 91免费国产视频网站| 一区二区高清免费观看影视大全| 欧美高清视频不卡网| 成人免费视频视频在线观看免费 | 久久久久久久电影| 色狠狠桃花综合| 成人免费福利片| 国产福利不卡视频| 老司机精品视频一区二区三区| 亚洲视频精选在线| 亚洲免费电影在线| 亚洲免费av网站| 亚洲激情图片小说视频| 国产精品欧美久久久久无广告| 日韩欧美国产一区二区在线播放| 91成人网在线| 制服丝袜国产精品| 精品久久久久久最新网址| 精品欧美黑人一区二区三区| 国产乱码精品一品二品| 久久久久久久精| 成人毛片视频在线观看| 国产精品丝袜一区| 精品国产网站在线观看| 精品免费国产二区三区| 国产亚洲精品精华液| 日本三级亚洲精品| 亚洲欧洲日韩一区二区三区| 91浏览器在线视频| 国产在线麻豆精品观看| 国产一二精品视频| 亚洲精品乱码久久久久久久久 | 欧美激情综合五月色丁香小说| 欧美成人官网二区| 日本一区二区三区dvd视频在线| 国产视频一区不卡| 亚洲与欧洲av电影| 久久精品国产第一区二区三区| 激情五月婷婷综合网| 成人午夜激情视频| 欧美日韩精品免费观看视频| 日韩欧美一卡二卡| 亚洲激情校园春色| 国产福利精品导航| 欧美大片在线观看| 午夜精品福利一区二区三区av | 久久蜜桃av一区精品变态类天堂| 中文字幕欧美一| 国内不卡的二区三区中文字幕 | 波多野洁衣一区| 精品国产不卡一区二区三区| 亚洲综合激情小说| 成人av在线播放网址| 欧美经典一区二区三区| 麻豆91精品91久久久的内涵| 欧美日韩一级片网站| 亚洲精品国产一区二区精华液 | 精品午夜久久福利影院| 欧美日韩在线精品一区二区三区激情| 国产欧美日韩视频在线观看| 久热成人在线视频| 日韩精品中午字幕| 久99久精品视频免费观看| 91精品欧美一区二区三区综合在| 亚洲永久免费av| 欧美一区二区人人喊爽| 日本欧美在线观看| 精品国产99国产精品| 国产一区二区久久| 中文字幕亚洲区| 在线欧美小视频| 久久99久久99小草精品免视看| 精品久久久久久久久久久久久久久久久 | 亚洲女人****多毛耸耸8| 日本韩国精品在线| 视频一区视频二区中文| 精品成人在线观看| 麻豆成人91精品二区三区| 欧美一级淫片007| 韩国一区二区三区| 亚洲少妇屁股交4| 91精品中文字幕一区二区三区| 久久99精品国产麻豆不卡| 国产精品成人免费| 欧美成人精品3d动漫h| 91小视频免费看| 国产在线一区二区| 亚洲国产精品一区二区久久恐怖片 | 日韩中文字幕区一区有砖一区| av福利精品导航| 欧美mv日韩mv亚洲| 蜜桃av噜噜一区| 久久久噜噜噜久久中文字幕色伊伊| 激情小说亚洲一区| 国产午夜精品一区二区三区嫩草 | 精品日韩一区二区| 色综合中文综合网| 久久九九影视网| 91精品国产91久久久久久最新毛片| 国产精品一区二区三区四区| 青娱乐精品在线视频| 五月激情综合色| 亚洲线精品一区二区三区八戒| 欧美国产视频在线| 中文字幕一区日韩精品欧美| 久久综合av免费| 国产精品美女久久久久av爽李琼 | 在线观看日产精品| 91国偷自产一区二区三区成为亚洲经典 | 国产精品久久综合| 亚洲精品ww久久久久久p站| 一区二区久久久| 久久成人久久爱| 成人精品国产免费网站| 91蜜桃婷婷狠狠久久综合9色| 色综合久久综合中文综合网| 欧美性感一区二区三区| 91麻豆精品国产91久久久更新时间| 欧美精品一二三| 欧美极品aⅴ影院| 亚洲午夜久久久久久久久久久 | 一区二区在线观看免费视频播放| 一卡二卡三卡日韩欧美| 久久99最新地址| 91久久精品日日躁夜夜躁欧美| 日韩一区二区视频| 亚洲视频香蕉人妖| 久久国产生活片100| 欧美自拍偷拍午夜视频| 亚洲精品在线免费观看视频| 亚洲国产日韩一区二区| 成人一级黄色片| 久久这里只有精品首页| 亚洲bdsm女犯bdsm网站| 91久久国产最好的精华液| 国产欧美日本一区视频| 久久99日本精品| 欧美一区二区三区系列电影| 一区二区三区四区五区视频在线观看| 日韩精品三区四区| 日韩一区二区三区四区| 亚洲成av人片在线| 7777精品伊人久久久大香线蕉的 | 欧美日本国产视频| 亚洲永久免费视频| 欧美日本免费一区二区三区| 一区二区三区在线免费| 色婷婷久久久久swag精品 | 日韩综合一区二区| 在线电影欧美成精品| 亚洲成a人片综合在线| 91精品国产一区二区三区香蕉| 亚洲免费观看在线观看| 日韩激情av在线| 99这里只有精品| 欧美激情一区二区| 久久国产夜色精品鲁鲁99| 精品视频123区在线观看| 国产精品私人影院| 国产成人综合亚洲91猫咪| 欧美伦理影视网| 久久99国产精品久久| 欧美日韩久久久| 蜜臀av性久久久久av蜜臀妖精| 欧美日韩精品一区二区天天拍小说| 亚洲欧洲日产国产综合网| 国产精品一区二区久久不卡| 国产精品久久福利| 制服丝袜成人动漫| 成人污污视频在线观看| 日韩高清电影一区| 亚洲丝袜精品丝袜在线| 欧美成人三级在线| 欧美色图第一页| 成人小视频在线| 麻豆91精品视频| 美女精品自拍一二三四| 亚洲精品国产品国语在线app| 欧美mv和日韩mv的网站| 欧美在线视频全部完| 成人美女视频在线观看| 国产成人在线影院 | 精品久久久网站| 日韩一区二区三区视频在线| 在线播放欧美女士性生活| 欧美专区亚洲专区|