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

genericCode -- ambient space of a code

Synopsis

Description

Given a code C over a finite field $F$ of length $n$, returns the code $F^n$.

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

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

o2 : LinearCode
i3 : genericCode(C)

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

o3 : LinearCode

Ways to use genericCode :

For the programmer

The object genericCode is a method function.