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

messages -- set of messages to be encoded by a code

Synopsis

Description

Given a code C of dimension $k$ over a finite field $F$, this function returns the list that contains all the elements of $F^k$. Every element of the list can be used to encode a message using the linear code C.

i1 : F=GF(4,Variable=>a);
i2 : R=linearCode(F,{{1,1,1}});
i3 : messages R

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

o3 : List
i4 : messages hammingCode(2,3)

o4 = {{1, 0, 0, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}, {1, 0, 1, 1}, {1, 1, 1, 0},
     ------------------------------------------------------------------------
     {1, 1, 1, 1}, {0, 1, 1, 0}, {0, 1, 0, 1}, {0, 1, 0, 0}, {0, 1, 1, 1},
     ------------------------------------------------------------------------
     {0, 0, 0, 1}, {0, 0, 0, 0}, {0, 0, 1, 1}, {0, 0, 1, 0}, {1, 1, 0, 1},
     ------------------------------------------------------------------------
     {1, 1, 0, 0}}

o4 : List
i5 : RM=reedMullerCode(2,2,1);
i6 : messages(RM.LinearCode)

o6 = {{0, 1, 0}, {0, 1, 1}, {1, 1, 1}, {0, 0, 0}, {0, 0, 1}, {1, 1, 0}, {1,
     ------------------------------------------------------------------------
     0, 1}, {1, 0, 0}}

o6 : List

This method is provided by the package CodingTheory.

See also

Ways to use messages :

For the programmer

The object messages is a method function.