@@ -410,7 +410,7 @@ def __init__(self, base_field, length, default_encoder_name, default_decoder_nam
410
410
1
411
411
sage: C.is_self_orthogonal()
412
412
False
413
- sage: print(C.divisor()) #long time
413
+ sage: print(C.divisor()) #long time
414
414
1
415
415
"""
416
416
from sage .coding .information_set_decoder import LinearCodeInformationSetDecoder
@@ -910,12 +910,12 @@ def covering_radius(self):
910
910
EXAMPLES::
911
911
912
912
sage: C = codes.HammingCode(GF(2), 5)
913
- sage: C.covering_radius() # optional - gap_package_guava
913
+ sage: C.covering_radius() # optional - gap_package_guava
914
914
...
915
915
1
916
916
917
917
sage: C = codes.random_linear_code(GF(263), 5, 1)
918
- sage: C.covering_radius() # optional - gap_package_guava
918
+ sage: C.covering_radius() # optional - gap_package_guava
919
919
Traceback (most recent call last):
920
920
...
921
921
NotImplementedError: the GAP algorithm that Sage is using
@@ -1374,7 +1374,7 @@ def minimum_distance(self, algorithm=None):
1374
1374
sage: C.minimum_distance(algorithm="gap") # optional - sage.libs.gap
1375
1375
3
1376
1376
sage: libgap.SetAllInfoLevels(0) # to suppress extra info messages # optional - sage.libs.gap
1377
- sage: C.minimum_distance(algorithm="guava") # optional - gap_package_guava
1377
+ sage: C.minimum_distance(algorithm="guava") # optional - gap_package_guava
1378
1378
...
1379
1379
3
1380
1380
@@ -1612,8 +1612,8 @@ def permutation_automorphism_group(self, algorithm="partition"):
1612
1612
[5, 3] Hamming Code over GF(4)
1613
1613
sage: G = C.permutation_automorphism_group(algorithm="partition"); G # optional - sage.groups
1614
1614
Permutation Group with generators [(1,3)(4,5), (1,4)(3,5)]
1615
- sage: GG = C.permutation_automorphism_group(algorithm="codecan") # long time, optional - sage.groups
1616
- sage: GG == G # long time, optional - sage.groups
1615
+ sage: GG = C.permutation_automorphism_group(algorithm="codecan") # long time, optional - sage.groups
1616
+ sage: GG == G # long time, optional - sage.groups
1617
1617
True
1618
1618
sage: C.permutation_automorphism_group(algorithm="gap") # optional - gap_package_guava sage.groups
1619
1619
Permutation Group with generators [(1,3)(4,5), (1,4)(3,5)]
@@ -1845,17 +1845,19 @@ def weight_distribution(self, algorithm=None):
1845
1845
[1, 0, 0, 7, 7, 0, 0, 1]
1846
1846
sage: C.weight_distribution(algorithm="binary")
1847
1847
[1, 0, 0, 7, 7, 0, 0, 1]
1848
+
1849
+ sage: # optional - gap_package_guava
1848
1850
sage: C = codes.HammingCode(GF(3), 3); C
1849
1851
[13, 10] Hamming Code over GF(3)
1850
- sage: C.weight_distribution() == C.weight_distribution(algorithm="leon") # optional - gap_package_guava
1852
+ sage: C.weight_distribution() == C.weight_distribution(algorithm="leon")
1851
1853
True
1852
1854
sage: C = codes.HammingCode(GF(5), 2); C
1853
1855
[6, 4] Hamming Code over GF(5)
1854
- sage: C.weight_distribution() == C.weight_distribution(algorithm="leon") # optional - gap_package_guava
1856
+ sage: C.weight_distribution() == C.weight_distribution(algorithm="leon")
1855
1857
True
1856
1858
sage: C = codes.HammingCode(GF(7), 2); C
1857
1859
[8, 6] Hamming Code over GF(7)
1858
- sage: C.weight_distribution() == C.weight_distribution(algorithm="leon") # optional - gap_package_guava
1860
+ sage: C.weight_distribution() == C.weight_distribution(algorithm="leon")
1859
1861
True
1860
1862
1861
1863
"""
@@ -2001,14 +2003,17 @@ def zeta_polynomial(self, name="T"):
2001
2003
sage: C = codes.HammingCode(GF(2), 3)
2002
2004
sage: C.zeta_polynomial()
2003
2005
2/5*T^2 + 2/5*T + 1/5
2004
- sage: C = codes.databases.best_linear_code_in_guava(6,3,GF(2)) # optional - gap_package_guava
2005
- sage: C.minimum_distance() # optional - gap_package_guava
2006
+
2007
+ sage: C = codes.databases.best_linear_code_in_guava(6, 3, GF(2)) # optional - gap_package_guava
2008
+ sage: C.minimum_distance() # optional - gap_package_guava
2006
2009
3
2007
- sage: C.zeta_polynomial() # optional - gap_package_guava
2010
+ sage: C.zeta_polynomial() # optional - gap_package_guava
2008
2011
2/5*T^2 + 2/5*T + 1/5
2012
+
2009
2013
sage: C = codes.HammingCode(GF(2), 4)
2010
2014
sage: C.zeta_polynomial()
2011
2015
16/429*T^6 + 16/143*T^5 + 80/429*T^4 + 32/143*T^3 + 30/143*T^2 + 2/13*T + 1/13
2016
+
2012
2017
sage: F.<z> = GF(4,"z")
2013
2018
sage: MS = MatrixSpace(F, 3, 6)
2014
2019
sage: G = MS([[1,0,0,1,z,z],[0,1,0,z,1,z],[0,0,1,z,z,1]])
@@ -2601,7 +2606,7 @@ class LinearCodeSyndromeDecoder(Decoder):
2601
2606
We build a first syndrome decoder, and pick a ``maximum_error_weight``
2602
2607
smaller than both the covering radius and half the minimum distance::
2603
2608
2604
- sage: D = C.decoder("Syndrome", maximum_error_weight = 1)
2609
+ sage: D = C.decoder("Syndrome", maximum_error_weight= 1)
2605
2610
sage: D.decoder_type()
2606
2611
{'always-succeed', 'bounded_distance', 'hard-decision'}
2607
2612
sage: D.decoding_radius()
@@ -2614,7 +2619,7 @@ class LinearCodeSyndromeDecoder(Decoder):
2614
2619
``maximum_error_weight`` is chosen to be bigger than half the minimum distance,
2615
2620
but lower than the covering radius::
2616
2621
2617
- sage: D = C.decoder("Syndrome", maximum_error_weight = 3)
2622
+ sage: D = C.decoder("Syndrome", maximum_error_weight= 3)
2618
2623
sage: D.decoder_type()
2619
2624
{'bounded_distance', 'hard-decision', 'might-error'}
2620
2625
sage: D.decoding_radius()
@@ -2628,10 +2633,10 @@ class LinearCodeSyndromeDecoder(Decoder):
2628
2633
And now, we build a third syndrome decoder, whose ``maximum_error_weight``
2629
2634
is bigger than both the covering radius and half the minimum distance::
2630
2635
2631
- sage: D = C.decoder("Syndrome", maximum_error_weight = 5) # long time
2632
- sage: D.decoder_type() # long time
2636
+ sage: D = C.decoder("Syndrome", maximum_error_weight=5) # long time
2637
+ sage: D.decoder_type() # long time
2633
2638
{'complete', 'hard-decision', 'might-error'}
2634
- sage: D.decoding_radius() # long time
2639
+ sage: D.decoding_radius() # long time
2635
2640
4
2636
2641
2637
2642
In that case, the decoder might still return an unexpected codeword, but
0 commit comments