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

Commit d581d76

Browse files
committed
add #20898 code as a doctest
1 parent 6f8bf3c commit d581d76

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/sage/coding/linear_code.py

+12
Original file line numberDiff line numberDiff line change
@@ -4431,6 +4431,18 @@ def __init__(self, code, maximum_error_weight=None):
44314431
Traceback (most recent call last):
44324432
...
44334433
ValueError: maximum_error_weight has to be less than code's length minus its dimension
4434+
4435+
The Syndrome Decoder of a Hamming code should have types
4436+
``minimum-distance`` and ``always-succeed`` (see :trac:`20898`)::
4437+
4438+
sage: C = codes.HammingCode(GF(5), 3)
4439+
sage: D = C.decoder("Syndrome")
4440+
sage: C.minimum_distance()
4441+
3
4442+
sage: D.maximum_error_weight()
4443+
1
4444+
sage: D.decoder_type()
4445+
{'always-succeed', 'complete', 'hard-decision', 'minimum-distance', 'unique'}
44344446
"""
44354447
n_minus_k = code.length() - code.dimension()
44364448
if maximum_error_weight == None:

0 commit comments

Comments
 (0)