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

# universeCode -- linear code $\mathtt{F}^\mathtt{n}$

- Usage:
    `universeCode(F,n)`
- Inputs:
  - F, a Galois field,
  - n, an integer,
- Outputs:
  - an instance of the type LinearCode,

## Description

Returns the code with largest dimension such that its length is n and the entries of its codewords are in the field F.

    i1 : F = GF(2,3);

    i2 : n=7;

    i3 : C=universeCode(F,n)

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

    o3 : LinearCode

    i4 : C.ParityCheckMatrix

    o4 = 0

                  1       7
    o4 : Matrix ZZ  <-- ZZ

## Ways to use universeCode:

- `universeCode(GaloisField,ZZ)`

## For the programmer

The object universeCode is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/CodingTheory.m2:3195:0.