65.17 IsLinearCode

IsLinearCode( obj )

IsLinearCode checks if object obj (not necessarily a code) is a linear code. If a code has already been marked as linear or cyclic, the function automatically returns true. Otherwise, the function checks if a basis G of the elements of obj exists that generates the elements of obj. If so, G is a generator matrix 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)
    gap> IsLinearCode( C );
    true
    gap> IsLinearCode( ElementsCode( [ [1,1,1] ], GF(2) ) );
    false
    gap> IsLinearCode( 1 );
    false 

Previous Up Top Next
Index

GAP 3.4.4
April 1997