diff --git a/commpy/channelcoding/ldpc.py b/commpy/channelcoding/ldpc.py index b3005e2..b8fe73c 100644 --- a/commpy/channelcoding/ldpc.py +++ b/commpy/channelcoding/ldpc.py @@ -304,7 +304,7 @@ def triang_ldpc_systematic_encode(message_bits, ldpc_code_params, pad=True): Encode bits using the LDPC code specified. If the generator matrix is not computed, this function will build it and add it to the dictionary. It will also add the parity check matrix. - This function work only for LDPC specified by a triangular parity check matrix. + This function work only for LDPC specified by a approximate triangular parity check matrix. Parameters ---------- @@ -312,7 +312,8 @@ def triang_ldpc_systematic_encode(message_bits, ldpc_code_params, pad=True): Message bit to encode. ldpc_code_params : dictionary that at least contains one of these options: - Option 1: generator matrix is available. + Option 1: generator matrix and parity-check matrix are available. + parity_check_matrix (CSC sparse matrix of int8) - parity check matrix. generator_matrix (2D-array or sparse matrix) - generator matrix of the code. Option 2: generator and parity check matrices will be added as sparse matrices. n_vnodes (int) - number of variable nodes. @@ -337,7 +338,7 @@ def triang_ldpc_systematic_encode(message_bits, ldpc_code_params, pad=True): If the message length is not a multiple of block length and pad is False. """ - if ldpc_code_params.get('generator_matrix') is None: + if ldpc_code_params.get('generator_matrix') is None or ldpc_code_params.get('parity_check_matrix') is None: build_matrix(ldpc_code_params) block_length = ldpc_code_params['generator_matrix'].shape[1] diff --git a/setup.py b/setup.py index d1dd6de..7d3d2ce 100644 --- a/setup.py +++ b/setup.py @@ -6,12 +6,12 @@ # Taken from scikit-learn setup.py DISTNAME = 'scikit-commpy' DESCRIPTION = 'Digital Communication Algorithms with Python' -LONG_DESCRIPTION = open('README.md').read() +LONG_DESCRIPTION = open('README.md', encoding="utf8").read() MAINTAINER = 'Veeresh Taranalli & Bastien Trotobas' -MAINTAINER_EMAIL = 'veeresht@gmail.com' +MAINTAINER_EMAIL = 'bastien.trotobas@gmail.com' URL = 'http://veeresht.github.com/CommPy' LICENSE = 'BSD 3-Clause' -VERSION = '0.7.0' +VERSION = '0.8.0' #This is a list of files to install, and where #(relative to the 'root' dir, where setup.py is) @@ -53,6 +53,7 @@ 'Intended Audience :: Science/Research', 'Intended Audience :: Telecommunications Industry', 'Operating System :: Unix', + 'Operating System :: Microsoft :: Windows', 'Programming Language :: Python', 'Topic :: Scientific/Engineering', 'Topic :: Software Development',