65.27 CheckPol

CheckPol( C )

CheckPol returns the check polynomial of C. The code consists of all polynomials f with f*h = 0 (mod x^n-1), where h is the check polynomial, and n is the word length of C. The check polynomial is computed from the generator polynomial, the generator or parity check matrix or the elements of C (if possible), whichever is available.

If C if not a cyclic code, the function returns an error.

    gap> CheckPol(GeneratorMatCode([[1, 1, 0], [0, 1, 1]], GF(2)));
    Z(2)^0*(X(GF(2))^2 + X(GF(2)) + 1)
    gap> CheckPol(WholeSpaceCode(4, GF(2)));
    Z(2)^0*(X(GF(2))^4 + 1)
    gap> CheckPol(NullCode(7,GF(3)));
    X(GF(3))^0
    gap> CheckPol(ElementsCode( [ [0, 0, 1 ], [1, 1, 0 ] ], GF(2) ) );
    Error, generator polynomial is only defined for cyclic codes 

Previous Up Top Next
Index

GAP 3.4.4
April 1997