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

📄 regress.py

📁 著名的ldpc编解码的资料及源代码
💻 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 BSC test decoded with SumProductBP',    N,K,E,L,'bit flips',0.05,channels.BSCOutput,numTrials=50,    maxIter=20,algorithm='SumProductBP',requiredSuccessRate=0.8,    verbose=0)testing.RequireSuccessfulDecoding(    'Small BSC test decoded with LRSumProductBP',    N,K,E,L,'bit flips',0.05,    lambda x,y: map(lambda z: exp(z),channels.BSCOutput(x,y)),    numTrials=50,maxIter=20,    algorithm='LRSumProductBP',requiredSuccessRate=0.8,verbose=0)

⌨️ 快捷键说明

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