Override sanity checks on decoder's output
Issue #157
new
Since we added sanity checks on the output of decode_to_code
and decode_to_message
, some decoding algorithms now need to compute the parity check matrix to be performed.
Forcing this behaviour is quite a shame for decoding algorithms which don't need the generator matrix nor the parity check matrix to run.
I propose to add a flag checks = True
which ignore all sanity checks if set to False
.
What do you think?
I disagree. I very highly doubt there is any algorithm for decoding any code which in its working is not powerful enough to determine whether a vector is a codeword or not.
Rather, it might be the case that the default implementation
c in C
, which computes the parity check matrix (and therefore usually also the generator matrix) might be inefficient for certain codes. There should therefore always be a way to formulate your decoder such that it is not (asymptotically) slower, but such that the generator/parity check matrices need not be computed.Take GRS codes as our canonical example. The Gao decoder begins by computing a Lagrange polynomial of the received word. This computation itself determines whether the received word is in the code: indeed, if
deg R < k
thenr in C
. I've mentioned this several times before. If you want to patch decoding of GRS codes, patch that.