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

Commit 8e363dd

Browse files
author
David Lucas
committedMay 12, 2016
Switched definition of decoding error and decoding failure

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎src/sage/coding/benchmark.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -812,20 +812,20 @@ def _perform_experiments_for_single_id(self, identifier, verbosity):
812812
c = C.random_element()
813813
generate_c_time = time.clock() - start
814814
y = Chan(c)
815-
decoding_failure = True
815+
decoding_error = True
816816
try:
817817
start = time.clock()
818818
dec_y = D.decode_to_code(y)
819819
decode_time = time.clock() - start
820-
decoding_error = False
820+
decoding_failure = False
821821
if "list-decoder" in D.decoder_type():
822-
decoding_failure = (c != dec_y)
822+
decoding_error = (c != dec_y)
823823
else:
824-
decoding_failure = (c != dec_y)
824+
decoding_error = (c != dec_y)
825825
except DecodingError:
826826
decode_time = time.clock() - start
827827
dec_y = None #as decoding failed
828-
decoding_error = True
828+
decoding_failure = True
829829
data[identifier, i] = (c, generate_c_time, y, dec_y, decode_time, decoding_error, decoding_failure)
830830

831831
#verbosity
@@ -1013,9 +1013,9 @@ def decoding_success_rate(self, target, identifier = None):
10131013
- ``target`` -- the operation whose success rate will be computed, can be
10141014
either:
10151015
1016-
- ``"error"``, which will compute a ratio on the number of decoding attempts
1016+
- ``"failure``, which will compute a ratio on the number of decoding attempts
10171017
which returned a word, whichever word it was
1018-
- ``"failure"``, which will compute a ratio on the number of decoding attempts
1018+
- ``"error"``, which will compute a ratio on the number of decoding attempts
10191019
which returned the original codeword
10201020
10211021
- ``identifier`` -- (default: ``None``) the identifier of the benchmark

0 commit comments

Comments
 (0)
This repository has been archived.