Removed TODOs; Formatting; Changed test_decoder() default SNR array
This commit is contained in:
parent
23e318609c
commit
bef9c8ee3a
@ -3,7 +3,6 @@ import numpy as np
|
||||
import itertools
|
||||
|
||||
|
||||
# TODO: Unify the interface regarding [0, 1]^n and [-1, 1]^n
|
||||
class MLDecoder:
|
||||
"""This class naively implements a soft decision decoder. The decoder calculates
|
||||
the correlation between the received signal and each codeword and then chooses the
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import numpy as np
|
||||
|
||||
|
||||
# TODO: Unify the interface regarding [0, 1]^n and [-1, 1]^n
|
||||
class ProximalDecoder:
|
||||
"""Class implementing the Proximal Decoding algorithm. See "Proximal Decoding for LDPC Codes"
|
||||
by Tadashi Wadayama, and Satoshi Takabe.
|
||||
|
||||
@ -225,7 +225,6 @@ Gs = {'Hamming_7_4': np.array([[1, 0, 0, 0, 0, 1, 1],
|
||||
#
|
||||
|
||||
|
||||
# TODO: Are n and k switched around or correct?
|
||||
def get_systematic_H(G: np.array) -> np.array:
|
||||
"""Compute the H matrix for a systematic code.
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ def count_bit_errors(d: np.array, d_hat: np.array) -> int:
|
||||
|
||||
def test_decoder(x: np.array,
|
||||
decoder: typing.Any,
|
||||
SNRs: typing.Sequence[float] = np.linspace(1, 4, 7),
|
||||
SNRs: typing.Sequence[float] = np.linspace(1, 7, 7),
|
||||
target_bit_errors: int = 100,
|
||||
N_max: int = 10000) \
|
||||
-> typing.Tuple[np.array, np.array]:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user