Macaulay2 » Documentation
Packages » CodingTheory > LinearCode > codewords
next | previous | forward | backward | up | index | toc

codewords -- codewords of the code

Synopsis

Description

Obtains all the codewords of a code C by multiplying all the elements of the ambient space (obtained with the function messages) by the generator matrix of C.

i1 : F=GF(4,Variable=>a);
i2 : C=linearCode(matrix{{1,a,0},{0,1,a}});
i3 : codewords(C)

o3 = {{a, a, a}, {a + 1, a, 1}, {1, 1, 1}, {0, 1, a}, {a, 1, a + 1}, {0, a, a
     ------------------------------------------------------------------------
     + 1}, {0, a + 1, 1}, {1, a + 1, a}, {a + 1, 0, a}, {a, 0, 1}, {a + 1, 1,
     ------------------------------------------------------------------------
     0}, {1, a, 0}, {a + 1, a + 1, a + 1}, {1, 0, a + 1}, {a, a + 1, 0}, {0,
     ------------------------------------------------------------------------
     0, 0}}

o3 : List

Ways to use codewords :

For the programmer

The object codewords is a method function.