@@ -47,7 +47,7 @@ REFERENCES:
47
47
EXAMPLES::
48
48
49
49
sage: from sage. coding. codecan. autgroup_can_label import LinearCodeAutGroupCanLabel
50
- sage: C = codes. HammingCode( 3, GF( 3)) . dual_code( )
50
+ sage: C = codes. HammingCode( GF( 3) , 3 ) . dual_code( )
51
51
sage: P = LinearCodeAutGroupCanLabel( C)
52
52
sage: P. get_canonical_form( ) . generator_matrix( )
53
53
[1 0 0 0 0 1 1 1 1 1 1 1 1 ]
@@ -63,7 +63,7 @@ EXAMPLES::
63
63
64
64
If the dimension of the dual code is smaller, we will work on this code::
65
65
66
- sage: C2 = codes. HammingCode( 3, GF( 3))
66
+ sage: C2 = codes. HammingCode( GF( 3) , 3 )
67
67
sage: P2 = LinearCodeAutGroupCanLabel( C2)
68
68
sage: P2. get_canonical_form( ) . parity_check_matrix( ) == P. get_canonical_form( ) . generator_matrix( )
69
69
True
@@ -72,7 +72,7 @@ There is a specialization of this algorithm to pass a coloring on the
72
72
coordinates. This is just a list of lists, telling the algorithm which
73
73
columns do share the same coloring::
74
74
75
- sage: C = codes. HammingCode( 3, GF( 4, 'a')) . dual_code( )
75
+ sage: C = codes. HammingCode( GF( 4, 'a') , 3 ) . dual_code( )
76
76
sage: P = LinearCodeAutGroupCanLabel( C, P=[ [0 ], [1 ], range( 2, C. length( )) ])
77
77
sage: P. get_autom_order( )
78
78
864
@@ -169,7 +169,7 @@ class LinearCodeAutGroupCanLabel:
169
169
EXAMPLES::
170
170
171
171
sage: from sage. coding. codecan. autgroup_can_label import LinearCodeAutGroupCanLabel
172
- sage: C = codes. HammingCode( 3, GF( 3)) . dual_code( )
172
+ sage: C = codes. HammingCode( GF( 3) , 3 ) . dual_code( )
173
173
sage: P = LinearCodeAutGroupCanLabel( C)
174
174
sage: P. get_canonical_form( ) . generator_matrix( )
175
175
[1 0 0 0 0 1 1 1 1 1 1 1 1 ]
@@ -206,7 +206,7 @@ class LinearCodeAutGroupCanLabel:
206
206
EXAMPLES::
207
207
208
208
sage: from sage.coding.codecan.autgroup_can_label import LinearCodeAutGroupCanLabel
209
- sage: C = codes.HammingCode(3, GF(2)).dual_code()
209
+ sage: C = codes.HammingCode(GF(2), 3 ).dual_code()
210
210
sage: P = LinearCodeAutGroupCanLabel(C)
211
211
sage: P.get_canonical_form().generator_matrix()
212
212
[1 0 0 0 1 1 1]
@@ -220,9 +220,9 @@ class LinearCodeAutGroupCanLabel:
220
220
[0 0 1 0 1 1 1]
221
221
"""
222
222
from sage.groups.semimonomial_transformations.semimonomial_transformation_group import SemimonomialTransformationGroup
223
- from sage.coding.linear_code import LinearCode
223
+ from sage.coding.linear_code import LinearCode, AbstractLinearCode
224
224
225
- if not isinstance (C, LinearCode ):
225
+ if not isinstance (C, AbstractLinearCode ):
226
226
raise TypeError (" %s is not a linear code" % C)
227
227
228
228
self .C = C
@@ -531,7 +531,7 @@ class LinearCodeAutGroupCanLabel:
531
531
EXAMPLES::
532
532
533
533
sage: from sage.coding.codecan.autgroup_can_label import LinearCodeAutGroupCanLabel
534
- sage: C = codes.HammingCode(3, GF(3)).dual_code()
534
+ sage: C = codes.HammingCode(GF(3), 3 ).dual_code()
535
535
sage: CF1 = LinearCodeAutGroupCanLabel(C).get_canonical_form()
536
536
sage: s = SemimonomialTransformationGroup(GF(3), C.length()).an_element()
537
537
sage: C2 = LinearCode(s*C.generator_matrix())
@@ -548,7 +548,7 @@ class LinearCodeAutGroupCanLabel:
548
548
EXAMPLES::
549
549
550
550
sage: from sage.coding.codecan.autgroup_can_label import LinearCodeAutGroupCanLabel
551
- sage: C = codes.HammingCode(3, GF(2)).dual_code()
551
+ sage: C = codes.HammingCode(GF(2), 3 ).dual_code()
552
552
sage: P = LinearCodeAutGroupCanLabel(C)
553
553
sage: g = P.get_transporter()
554
554
sage: D = P.get_canonical_form()
@@ -564,7 +564,7 @@ class LinearCodeAutGroupCanLabel:
564
564
EXAMPLES::
565
565
566
566
sage: from sage.coding.codecan.autgroup_can_label import LinearCodeAutGroupCanLabel
567
- sage: C = codes.HammingCode(3, GF(2)).dual_code()
567
+ sage: C = codes.HammingCode(GF(2), 3 ).dual_code()
568
568
sage: A = LinearCodeAutGroupCanLabel(C).get_autom_gens()
569
569
sage: Gamma = C.generator_matrix().echelon_form()
570
570
sage: all([(g*Gamma).echelon_form() == Gamma for g in A])
@@ -579,7 +579,7 @@ class LinearCodeAutGroupCanLabel:
579
579
EXAMPLES::
580
580
581
581
sage: from sage.coding.codecan.autgroup_can_label import LinearCodeAutGroupCanLabel
582
- sage: C = codes.HammingCode(3, GF(2)).dual_code()
582
+ sage: C = codes.HammingCode(GF(2), 3 ).dual_code()
583
583
sage: LinearCodeAutGroupCanLabel(C).get_autom_order()
584
584
168
585
585
"""
@@ -599,7 +599,7 @@ class LinearCodeAutGroupCanLabel:
599
599
EXAMPLES::
600
600
601
601
sage: from sage. coding. codecan. autgroup_can_label import LinearCodeAutGroupCanLabel
602
- sage: C = codes. HammingCode( 3, GF( 4, 'a')) . dual_code( )
602
+ sage: C = codes. HammingCode( GF( 4, 'a') , 3 ) . dual_code( )
603
603
sage: A = LinearCodeAutGroupCanLabel( C) . get_PGammaL_gens( )
604
604
sage: Gamma = C. generator_matrix( )
605
605
sage: N = [ x.monic() for x in Gamma.columns() ]
@@ -628,7 +628,7 @@ class LinearCodeAutGroupCanLabel:
628
628
EXAMPLES::
629
629
630
630
sage: from sage. coding. codecan. autgroup_can_label import LinearCodeAutGroupCanLabel
631
- sage: C = codes. HammingCode( 3, GF( 4, 'a')) . dual_code( )
631
+ sage: C = codes. HammingCode( GF( 4, 'a') , 3 ) . dual_code( )
632
632
sage: LinearCodeAutGroupCanLabel( C) . get_PGammaL_order( ) == GL( 3, GF( 4, 'a')) . order( ) * 2/3
633
633
True
634
634
"""
0 commit comments