Added TODOs

This commit is contained in:
Andreas Tsouchlos 2022-11-08 19:13:51 +01:00
parent 6fc01b20ff
commit bb31b53d98
3 changed files with 5 additions and 0 deletions

View File

@ -22,4 +22,5 @@ class Encoder:
:param d: Dataword (element of [0, 1]^n)
:return: Codeword (already element of [-1, 1]^n)
"""
# TODO: (0 -> 1), (1 -> -1); Not (0 -> -1), (-1 -> 1)
return np.dot(d, self._G) * 2 - 1

View File

@ -14,6 +14,9 @@ def get_noise_amp_from_SNR(SNR: float, signal_amp: float = 1) -> float:
SNR_linear = 10 ** (SNR / 10)
noise_amp = (1 / np.sqrt(SNR_linear)) * signal_amp
# TODO: Fix noise amp calculation
# sigma**2 = 1 / (2 * (k/n) * (E_b/N_0))
return noise_amp

View File

@ -18,6 +18,7 @@ def count_bit_errors(d: np.array, d_hat: np.array) -> int:
return np.sum(d != d_hat)
# TODO: Fix uses of n, k, a everywhere
def test_decoder(encoder: typing.Any,
decoder: typing.Any,
d: np.array,