gap-packages / guava

GAP package guava - computations relative to error-correcting codes
https://gap-packages.github.io/guava
Other
13 stars 7 forks source link

GeneralizedReedSolomonCode decoding is broken #12

Open osj1961 opened 8 years ago

osj1961 commented 8 years ago
gap> R:=PolynomialRing(GF(11),["t"]);
GF(11)[t]
gap> P:=List([1,3,4,5,7],i->Z(11)^i);
[ Z(11), Z(11)^3, Z(11)^4, Z(11)^5, Z(11)^7 ]
gap> C:=GeneralizedReedSolomonCode(P,3,R);
a linear [5,3,1..3]2  generalized Reed-Solomon code over GF(11)
gap> c := Random(C);
[ 5 4 5 4 2 ]
gap> i := InformationWord(C, c);
[ 2 1 3 ]
gap> Decode(C,c);  
[ 2 1 3 ]
gap> e := ErrorVector(Random([1..WordLength(C)]), C);
[ 0 0 0 1 0 ]
gap> r:=c+e;
[ 5 4 5 5 2 ]
gap> Decode(C,r);  
Error, ERROR: codeword must belong to code called from
InformationWord( C, SpecialDecoder( C )( C, c )
 ) at /usr/local/lib/gap4r8/pkg/guava/lib/decoders.gi:70 called from
<function "unknown">( <arguments> )
 called from read-eval loop at line 123 of *stdin*
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk>