Macaulay2 » Documentation
Packages » CodingTheory > length(LinearCode)
next | previous | forward | backward | up | index | toc

length(LinearCode) -- returns the length of a linear code

Synopsis

Description

Given a linear code C over a Galois field, returns the number of entries in any codeword in C. This parameter is called the length of the code.

This method is provided by the package CodingTheory.

i1 : C = linearCode(GF(4),{{1,1,1,1}});
i2 : length C

o2 = 4
i3 : H = hammingCode(2,3);
i4 : length H

o4 = 7

The next example illustrates how to use this function for the class of Evaluation Codes.

i5 : RM = reedMullerCode(2,3,1);
i6 : length RM.LinearCode

o6 = 8

Ways to use this method: