how to built list-decoder ?

asked 0 years ago

saraf87 gravatar image

updated 0 years ago

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
Preview: (hide)

Comments

Edited for legibility.

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

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 0 years ago )

Please provide a complete code example.

Max Alekseyev gravatar imageMax Alekseyev ( 0 years ago )
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 ( 0 years ago )