small_bec_test.py

来自「著名的ldpc编解码的资料及源代码」· Python 代码 · 共 28 行

PY
28
字号
import randomfrom pycodes.utils import CodeMakerfrom pycodes.utils.channel_coding_perf import *from pycodes.utils.channels import BSCOutputseed = random.getstate()random.setstate(seed)print 'using seed',seedcol_w = 3row_w = 6N = 1002K = N*col_w/row_wE = (N-K)*row_wL = CodeMaker.make_H_gallager(N,col_w,row_w)erasureProb = [0.4, 0.375, 0.35, 0.325]numTrials = [250]*len(erasureProb)maxIter = 20tester = Tester([CodeParams(N,K,E,L,'small test','erasures',erasureProb,                            BECOutput,numTrials,maxIter,algorithm='default')])tester.ReportStats(title='Small BEC test for code of length %i' % N,                   reportFile='/tmp/small_BEC_test_results.py',                   imgFile='/tmp/small_BEC_test_results.eps')

⌨️ 快捷键说明

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