⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 small_bec_perf.py

📁 著名的ldpc编解码的资料及源代码
💻 PY
字号:
"""This test creates a dual of a small regular Gallager code,generates random binary words, erases a fraction of the bits in theword and tries to match the unerased positions with a codeword."""import randomfrom pycodes.utils import CodeMakerfrom pycodes.utils.bec_quant_perf import *#random.setstate((1, (25685, 5259, 296), None))seed = random.getstate()print 'Using seed ', seedcol_w = 3row_w = 6N=3600K=N*col_w/row_wE=(N-K)*row_wL=CodeMaker.make_H_gallager(N,col_w,row_w)numSteps = 6numToErase = range(round((N-K)*1.14),round(K*1.165),round(.025*K/numSteps))numTimes = [200]*len(numToErase)tester = BECTester([CodeParams(N,K,E,L,'small test',numToErase,numTimes)])tester.ReportStats(title='Test results for small length %i code w/seed %s: \n'                   % (N,`seed`), reportFile='/tmp/small_test_results.py',                   imgFile='/tmp/small_test_results.eps')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -