Fixed usage of n and k
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user