GrayMat( n, F )
GrayMat
returns a list of all different vectors (see Vectors
) of
length n over the field F, using Gray ordening. n must be a
positive integer. This order has the property that subsequent vectors
differ in exactly one coordinate. The first vector is always the null
vector. Each call to GrayMat
returns a new matrix, so it is safe to
modify the result.
gap> GrayMat(3); [ [ 0*Z(2), 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, Z(2)^0, 0*Z(2) ], [ Z(2)^0, Z(2)^0, Z(2)^0 ], [ Z(2)^0, 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ] gap> G := GrayMat( 4, GF(4) );; Length(G); 256 # the length of a GrayMat is always $q^n$ gap> G[101] - G[100]; [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ]
GAP 3.4.4