@@ -208,6 +208,9 @@ def __init__(self, code):
208
208
sage: E
209
209
Extended matrix-based encoder for Extended code coming from Linear code of length 11, dimension 5 over Finite Field of size 7
210
210
"""
211
+ if not isinstance (code , ExtendedCode ):
212
+ raise TypeError ("code has to be an instance of ExtendedCode class" )
213
+
211
214
super (ExtendedCodeExtendedMatrixEncoder , self ).__init__ (code )
212
215
213
216
def _repr_ (self ):
@@ -329,6 +332,9 @@ def __init__(self, code, original_decoder = None, **kwargs):
329
332
...
330
333
ValueError: Original decoder must have the original code as associated code
331
334
"""
335
+ if not isinstance (code , ExtendedCode ):
336
+ raise TypeError ("code has to be an instance of ExtendedCode class" )
337
+
332
338
original_code = code .original_code ()
333
339
if original_decoder is not None and not original_decoder .code () == original_code :
334
340
raise ValueError ("Original decoder must have the original code as associated code" )
@@ -441,10 +447,15 @@ def decode_to_code(self, y, **kwargs):
441
447
decoded_list .append (last_pos )
442
448
return vector (F , decoded_list )
443
449
444
- def decoding_radius (self , ** kwargs ):
450
+ def decoding_radius (self , * args , * *kwargs ):
445
451
r"""
446
452
Returns maximal number of errors that ``self`` can decode.
447
453
454
+ INPUT:
455
+
456
+ - ``*args``, ``**kwargs`` -- arguments and optional arguments are
457
+ forwarded to original decoder's ``decoding_radius`` method.
458
+
448
459
EXAMPLES::
449
460
450
461
sage: C = codes.GeneralizedReedSolomonCode(GF(16, 'a').list()[:15], 7)
@@ -453,7 +464,7 @@ def decoding_radius(self, **kwargs):
453
464
sage: D.decoding_radius()
454
465
4
455
466
"""
456
- return self .original_decoder ().decoding_radius (** kwargs )
467
+ return self .original_decoder ().decoding_radius (* args , * *kwargs )
457
468
458
469
459
470
####################### registration ###############################
0 commit comments