diff --git a/sw/decoders/proximal.py b/sw/decoders/proximal.py index 953c0eb..aa226d8 100644 --- a/sw/decoders/proximal.py +++ b/sw/decoders/proximal.py @@ -55,13 +55,9 @@ class ProximalDecoder: # Calculate second term for k, x_k in enumerate(x): - # TODO: Perform the summation with np.sum() sum_result = 0 for i in self._B[k]: - prod = 1 - for j in self._A[i]: - prod *= x[j] - + prod = np.prod(x[self._A[i]]) sum_result += prod**2 - prod term_2 = 2 / x_k * sum_result @@ -70,7 +66,7 @@ class ProximalDecoder: return np.array(result) - # TODO: Is this correct? + # TODO: Is the 'projection onto [-eta, eta]' actually just clipping? def _projection(self, x): """Project a vector onto [-eta, eta]^n in order to avoid numerical instability. Detailed in 3.2, p. 3 (Equation (15)).