65.18 IsCyclicCode

IsCyclicCode( obj )

IsCyclicCode checks if the object obj is a cyclic code. If a code has already been marked as cyclic, the function automatically returns true. Otherwise, the function checks if a polynomial g exists that generates the elements of obj. If so, g is a generator polynomial of obj and the function returns true. If not, the function returns false.

    gap> C := ElementsCode( [ [0,0,0], [1,1,1] ], GF(2) );
    a (3,2,1..3)1 user defined unrestricted code over GF(2)
    # {\GUAVA} does not know the code is cyclic
    gap> IsCyclicCode( C );      # this command tells {\GUAVA} to find out
    true
    gap> IsCyclicCode( HammingCode( 4, GF(2) ) );
    false
    gap> IsCyclicCode( 1 );
    false 

Previous Up Top Next
Index

GAP 3.4.4
April 1997