how to built list-decoder ?

asked 2024-05-27 23:49:00 +0100

saraf87 gravatar image

updated 2024-05-28 08:43:49 +0100

Emmanuel Charpentier gravatar image

refer to this page: I'm not allowed to put a link. just google : Decoders sagemath

I'm trying to specify the type of the decoder to be list-decoder: The decoder outputs a list of likely codewords, instead of just a single codeword. I'm not sure how to pass it.

D = C.decoder()
D.decoder_type() # output:  {'complete', 'hard-decision', 'might-error'}

==== I tried this, gives me no error but it did not return list of codewords

D = C.decoder()
D.decoder_type = {'list-decoder'}
print (D).           # output : Syndrome decoder for [16, 4] Goppa code over GF(2) handling errors of weight up to 6

when I tried to check its type, it gives me error

D.decoder_type() #   TypeError: 'set' object is not callable
edit retag flag offensive close merge delete

Comments

Edited for legibility.

Note : in Python/Sage, a comment is introduced by #, not \\ ; I edited suitably...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2024-05-28 08:46:22 +0100 )edit

Please provide a complete code example.

Max Alekseyev gravatar imageMax Alekseyev ( 2024-05-28 13:33:25 +0100 )edit
1

The error itself is easy to explain. By making assignment D.decoder_type = {'list-decoder'}, you overwrite the method value of D.decoder_type with the set value. Hence, calling D.decoder_type() is impossible after such an assignment.

Max Alekseyev gravatar imageMax Alekseyev ( 2024-05-28 17:16:31 +0100 )edit