📄 regress.py
字号:
"""This module contains various regression tests designed to make surechannel decoding functions are working correctly."""import pycodesfrom pycodes.utils import channels, CodeMaker, testingfrom math import exp(N,K) = (1200,600)L = CodeMaker.make_H_gallager(N,3,6) E = (N-K)*6 # number of edges in the code graphtesting.RequireSuccessfulDecoding( 'Small BEC test decoded with SumProductBP', N,K,E,L,'erasures',0.35,channels.BECOutput, numTrials=50,maxIter=20,algorithm='SumProductBP',requiredSuccessRate=0.8)testing.RequireSuccessfulDecoding( 'Small BEC test decoded with LRSumProductBP', N,K,E,L,'erasures',0.35, lambda x,y: map(lambda z: exp(min(z,10)),channels.BECOutput(x,y)), numTrials=50,maxIter=20,algorithm='LRSumProductBP', requiredSuccessRate=0.8)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -