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

dualCode -- dual of a code

Synopsis

Description

The dual of a code C of length $n$ over the field $F$ is the code whose codewords are the elements $v$ in $F^n$ such that for any $c$ in C, the inner product $<c,v>$ is equal to zero. This function returns the dual of C.

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

                                  3
o3 = LinearCode{AmbientModule => F                           }
                BaseField => F
                cache => CacheTable{}
                Code => image | a+1 |
                              | a   |
                              | 1   |
                GeneratorMatrix => | a+1 a 1 |
                Generators => {{a + 1, a, 1}}
                ParityCheckMatrix => | 1 0 a+1 |
                                     | 0 1 a   |
                ParityCheckRows => {{1, 0, a + 1}, {0, 1, a}}

o3 : LinearCode

Ways to use dualCode :

For the programmer

The object dualCode is a method function.