CheckMatCode( H [, Name ], F )
CheckMatCode
returns a linear code with check matrix H. H must be a
matrix over Galois field F. Name can contain a short description of
the code. The parity check matrix is the transposed of the nullmatrix of
the generator matrix of the code. Therefore, c*<H>^T = 0 where c is
an element of the code. If H is a r*n-matrix, the code has word
length n, redundancy r and dimension n-r.
If the check 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 check matrix can be retrieved with the
function CheckMat
(see CheckMat).
gap> G := Z(3)^0 * [[1,0,1,2,0],[0,1,2,1,1],[0,0,1,2,1]];; gap> C1 := CheckMatCode( G, GF(3) ); a linear [5,2,1..2]2..3 code defined by check matrix over GF(3) gap> CheckMat(C1); [ [ Z(3)^0, 0*Z(3), Z(3)^0, Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, Z(3), Z(3)^0, Z(3)^0 ], [ 0*Z(3), 0*Z(3), Z(3)^0, Z(3), Z(3)^0 ] ] gap> C2 := CheckMatCode( IdentityMat( 5, GF(2) ), GF(2) ); a linear [5,0,5]5 code defined by check matrix over GF(2)
GAP 3.4.4