65.59 GeneratorMatCode

GeneratorMatCode( G [, Name ], F )

GeneratorMatCode returns a linear code with generator matrix G. G must be a matrix over Galois field F. Name can contain a short description of the code. The generator matrix is the basis of the elements of the code. The resulting code has word length n, dimension k if G is a k * n-matrix. If GF(q) is the field of the code, the size of the code will be q^k.

If the generator matrix does not have full row rank, the linearly dependent rows are removed. This is done by the function BaseMat (see BaseMat) and results in an equal code. The generator matrix can be retrieved with the function GeneratorMat (see GeneratorMat).

    gap> G := Z(3)^0 * [[1,0,1,2,0],[0,1,2,1,1],[0,0,1,2,1]];;
    gap> C1 := GeneratorMatCode( G, GF(3) );
    a linear [5,3,1..2]1..2 code defined by generator matrix over GF(3)
    gap> C2 := GeneratorMatCode( IdentityMat( 5, GF(2) ), GF(2) );
    a linear [5,5,1]0 code defined by generator matrix over GF(2)
    gap> GeneratorMatCode( Elements( NordstromRobinsonCode() ), GF(2) );
    a linear [16,11,1..4]2 code defined by generator matrix over GF(2)
    # This is the smallest linear code that contains the N-R code 

Previous Up Top Next
Index

GAP 3.4.4
April 1997