A linear code is the image of some mapping between vector spaces, where each vector space is taken to be over the same finite field. A codeword is an element of the image. A linear code in Macaulay2 is implemented as a hash table. The values of the hash table correspond to common representations of the code, as well as information about its structure. The values include the base field of the modules, a set of generators for the code, and more. To construct a linear code, see linearCode.
|
|
|
|
For the mapping defined above, we call the codomain of the mapping the ambient module. The length of a code is defined to be the rank of this module.
|
|
|
|
|
Since a linear code $C$ is a vector subspace over some finite field, we may represent it using a Generator Matrix, i.e., a matrix whose rows form a basis for $C$. The dimension of a code is the rank of the generator matrix.
|
A linear code in Macaulay2 also includes a parity check matrix $H$, which generates the vector space orthogonal to $C$. Let $c$ be a code word in $C$ and $h$ a vector in the space generated by the rows of $H$. Then the dot product between $c$ and $h$ is zero.
|
|
|
While some functions may work even when a ring is given, instead of a finite field, it is possible that the results are not the expected ones.
The object LinearCode is a type, with ancestor classes HashTable < Thing.
The source of this document is in CodingTheory.m2:2546:0.