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

informationRate -- information rate of a code

Synopsis

Description

Given a linear code C of length $n$ and dimension $k$, this function returns the number $\frac{k}{n}$, which is known as the information rate of C.

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

     1
o2 = -
     4

o2 : QQ
i3 : H=hammingCode(2,3);
i4 : informationRate H

     4
o4 = -
     7

o4 : QQ

The next is an example for the class of EvaluationCode.

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

     1
o6 = -
     2

o6 : QQ

Ways to use informationRate :

For the programmer

The object informationRate is a method function.