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

Commit 76b83d7

Browse files
author
iremarquez
committed
Documentation correct
1 parent d7dc206 commit 76b83d7

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/sage/coding/linear_code.py

+11-9
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ def add_decoder(self, name, decoder):
900900
901901
sage: C2 = codes.HammingCode(GF(2), 3)
902902
sage: C2.decoders_available()
903-
['Syndrome', 'NearestNeighbor', 'TestSet']
903+
['TestSet', 'Syndrome', 'NearestNeighbor']
904904
905905
TESTS:
906906
@@ -1498,7 +1498,7 @@ def _insert_next_fq(self, v, List, Fqstar):
14981498
14991499
EXAMPLE::
15001500
1501-
sage: C = codes.HammingCode(2,GF(3))
1501+
sage: C = codes.HammingCode(GF(3),2)
15021502
sage: v =vector(GF(3),C.length())
15031503
sage: Fqstar= C.base_ring().list()[1:]
15041504
sage: List=[]
@@ -1576,7 +1576,6 @@ def coset_leaders(self, algorithm="all"):
15761576
sage: G = matrix(GF(5),[[1,0,2],[3,2,4]])
15771577
sage: C = LinearCode(G)
15781578
sage: C.coset_leaders("all")
1579-
15801579
[[(0, 0, 0)],
15811580
[(1, 0, 0), (0, 3, 0), (0, 0, 3)],
15821581
[(2, 0, 0), (0, 1, 0), (0, 0, 1)],
@@ -1762,7 +1761,7 @@ def unique_decoding_radius(self):
17621761
sage: C.unique_decoding_radius()
17631762
1
17641763
1765-
sage:G = matrix(GF(2),[[1,0,0,0,0,1,1,0,0,1,0,1,1,0,1],[0,1,1,1,0,1,1,1,1,1,0,0,0,1,1]])
1764+
sage: G = matrix(GF(2),[[1,0,0,0,0,1,1,0,0,1,0,1,1,0,1],[0,1,1,1,0,1,1,1,1,1,0,0,0,1,1]])
17661765
sage: C = LinearCode(G)
17671766
sage: C.unique_decoding_radius()
17681767
3
@@ -1839,7 +1838,7 @@ def decode_to_code(self, word, decoder_name=None, **kwargs):
18391838
It is possible to manually choose the decoder amongst the list of the available ones::
18401839
18411840
sage: C.decoders_available()
1842-
['Syndrome', 'NearestNeighbor','TestSet']
1841+
['TestSet', 'Syndrome', 'NearestNeighbor']
18431842
sage: C.decode_to_code(w_err, 'NearestNeighbor')
18441843
(1, 1, 0, 0, 1, 1, 0)
18451844
"""
@@ -1876,7 +1875,7 @@ def decode_to_message(self, word, decoder_name=None, **kwargs):
18761875
It is possible to manually choose the decoder amongst the list of the available ones::
18771876
18781877
sage: C.decoders_available()
1879-
['Syndrome', 'NearestNeighbor']
1878+
['TestSet', 'Syndrome', 'NearestNeighbor']
18801879
sage: C.decode_to_message(word, 'NearestNeighbor')
18811880
(0, 1, 1, 0)
18821881
"""
@@ -1916,7 +1915,7 @@ def decoder(self, decoder_name=None, **kwargs):
19161915
an exception will be raised::
19171916
19181917
sage: C.decoders_available()
1919-
['Syndrome', 'NearestNeighbor']
1918+
['TestSet', 'Syndrome', 'NearestNeighbor']
19201919
sage: C.decoder('Try')
19211920
Traceback (most recent call last):
19221921
...
@@ -1948,8 +1947,9 @@ def decoders_available(self, classes=False):
19481947
['TestSet', 'Syndrome', 'NearestNeighbor']
19491948
19501949
sage: C.decoders_available(True)
1951-
{'TestSet': <class 'sage.coding.linear_code.LinearCodeTestSetDecoder'>,'NearestNeighbor': <class 'sage.coding.linear_code.LinearCodeNearestNeighborDecoder'>,
1952-
'Syndrome': <class 'sage.coding.linear_code.LinearCodeSyndromeDecoder'>}
1950+
{'NearestNeighbor': <class 'sage.coding.linear_code.LinearCodeNearestNeighborDecoder'>,
1951+
'Syndrome': <class 'sage.coding.linear_code.LinearCodeSyndromeDecoder'>,
1952+
'TestSet': <class 'sage.coding.linear_code.LinearCodeTestSetDecoder'>}
19531953
"""
19541954
if classes == True:
19551955
return copy(self._registered_decoders)
@@ -4429,6 +4429,8 @@ class LinearCodeSystematicEncoder(Encoder):
44294429
44304430
The following demonstrates the basic usage of :class:`LinearCodeSystematicEncoder`::
44314431
4432+
4433+
sage: G = Matrix(GF(2), [[1,1,1,0,0,0,0,0],\
44324434
[1,0,0,1,1,0,0,0],\
44334435
[0,1,0,1,0,1,0,0],\
44344436
[1,1,0,1,0,0,1,1]])

0 commit comments

Comments
 (0)