Fixed usage of n and k

This commit is contained in:
2022-11-10 09:51:58 +01:00
parent f29c2e71de
commit 70bbe08bc4
4 changed files with 10 additions and 11 deletions

View File

@@ -25,6 +25,7 @@ class MLDecoder:
"""Generate a list of all possible codewords.
:return: Numpy array of the form [[codeword_1], [codeword_2], ...]
(Each generated codeword is an element of [0, 1]^n)
"""
k, n = self._G.shape
@@ -44,7 +45,7 @@ class MLDecoder:
:param y: Vector of received values. (y = x + w, where 'x' is element of [-1, 1]^n
and 'w' is noise)
:return: Most probably sent dataword (element of [0, 1]^k)
:return: Most probably sent codeword (element of [0, 1]^k)
"""
correlations = np.dot(self._codewords_bpsk, y)

View File

@@ -73,7 +73,7 @@ class ProximalDecoder:
:param y: Vector of received values. (y = x + w, where 'x' is element of [-1, 1]^n
and 'w' is noise)
:return: Most probably sent codeword (element of [0, 1]^k)
:return: Most probably sent codeword (element of [0, 1]^n)
"""
s = np.zeros(self._n)
x_hat = np.zeros(self._n)