Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Switched definition of decoding error and decoding failure
Browse files Browse the repository at this point in the history
  • Loading branch information
David Lucas committed May 12, 2016
1 parent d2d6e26 commit 8e363dd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/sage/coding/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,20 +812,20 @@ def _perform_experiments_for_single_id(self, identifier, verbosity):
c = C.random_element()
generate_c_time = time.clock() - start
y = Chan(c)
decoding_failure = True
decoding_error = True
try:
start = time.clock()
dec_y = D.decode_to_code(y)
decode_time = time.clock() - start
decoding_error = False
decoding_failure = False
if "list-decoder" in D.decoder_type():
decoding_failure = (c != dec_y)
decoding_error = (c != dec_y)
else:
decoding_failure = (c != dec_y)
decoding_error = (c != dec_y)
except DecodingError:
decode_time = time.clock() - start
dec_y = None #as decoding failed
decoding_error = True
decoding_failure = True
data[identifier, i] = (c, generate_c_time, y, dec_y, decode_time, decoding_error, decoding_failure)

#verbosity
Expand Down Expand Up @@ -1013,9 +1013,9 @@ def decoding_success_rate(self, target, identifier = None):
- ``target`` -- the operation whose success rate will be computed, can be
either:
- ``"error"``, which will compute a ratio on the number of decoding attempts
- ``"failure``, which will compute a ratio on the number of decoding attempts
which returned a word, whichever word it was
- ``"failure"``, which will compute a ratio on the number of decoding attempts
- ``"error"``, which will compute a ratio on the number of decoding attempts
which returned the original codeword
- ``identifier`` -- (default: ``None``) the identifier of the benchmark
Expand Down

0 comments on commit 8e363dd

Please sign in to comment.