Opened 3 years ago

Closed 3 years ago

#21347 closed enhancement (fixed)

decode_to_code should return an empty list instead of None when no codeword is found

Reported by: bruno Owned by:
Priority: major Milestone: sage-7.4
Component: coding theory Keywords: sd75, list decoding
Cc: jsrn, dlucas Merged in:
Authors: Bruno Grenet Reviewers: Clément Pernet
Report Upstream: N/A Work issues:
Branch: 83a368e (Commits) Commit: 83a368eab73b22e3b282d2dcb53b786dff17efba
Dependencies: Stopgaps:


sage: C = codes.GeneralizedReedSolomonCode(GF(17).list()[:15], 5)
sage: D = C.decoder(decoder_name="GuruswamiSudan", tau = 6)
sage: Channel = channels.StaticErrorRateChannel(GF(17)^15, 7) #too much errors on purpose
sage: c = C.random_element()
sage: ce = Channel.transmit(c)
sage: D.decode_to_code(ce) is None
sage: D.decode_to_message(ce)
Traceback (most recent call last):
TypeError: 'NoneType' object is not iterable

Change History (5)

comment:1 Changed 3 years ago by bruno

  • Branch set to u/bruno/decode_to_code_should_return_an_empty_list_instead_of_none_when_no_codeword_is_found

comment:2 Changed 3 years ago by bruno

  • Authors set to Bruno Grenet
  • Cc jsrn dlucas added
  • Commit set to 83a368eab73b22e3b282d2dcb53b786dff17efba
  • Status changed from new to needs_review
  • Type changed from PLEASE CHANGE to enhancement

New commits:

83a368e21347: Replace None by []

comment:3 Changed 3 years ago by cpernet

  • Status changed from needs_review to positive_review

Looks good and passes the coding.* test-suite.

comment:4 Changed 3 years ago by cpernet

  • Reviewers set to Clément Pernet

comment:5 Changed 3 years ago by vbraun

  • Branch changed from u/bruno/decode_to_code_should_return_an_empty_list_instead_of_none_when_no_codeword_is_found to 83a368eab73b22e3b282d2dcb53b786dff17efba
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.